0% found this document useful (0 votes)
59 views

VisualVert PDF

This document contains code snippets demonstrating how to iterate through arrays and retrieve network adapter names. It shows declaring arrays, checking if a variable is an array, looping through an array using For Each and For loops, getting network adapter names and storing them in an array, and building a message string by concatenating the adapter names from the array.

Uploaded by

unicaprincipessa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

VisualVert PDF

This document contains code snippets demonstrating how to iterate through arrays and retrieve network adapter names. It shows declaring arrays, checking if a variable is an array, looping through an array using For Each and For loops, getting network adapter names and storing them in an array, and building a message string by concatenating the adapter names from the array.

Uploaded by

unicaprincipessa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

option explicit

Dim astr, name

aStr=Array("Hi","Hello")
name="BalajiMore"

WScript.Echo "IsArray(astr): "& IsArray(astr)


WScript.Echo "IsArray(name): "& IsArray(name)

WScript.Echo IsArray(astr)

wscript.quit

'====================================

For Each Element In Arr


WScript.Echo Element
Next
This requires, as I said before, an Array of type Variant (i.e., VarType returns 8204).

For N = 0 To UBound(Arr)
WScript.Echo Arr(N)
Next

'====================================

Option Compare Database

Dim objMain As oMain


Dim objAdapt As oNetworkAdapter

Sub Main()
Dim stMsg As String
Dim lgCount As Long
Dim stAdapt() As String
Dim stAdapters As String

Set objMain = New oMain


Set objAdapt = New oNetworkAdapter

Call objMain.UnlockComponent("xxx-xxxxx-xxxxx-xx")

Call objAdapt.GetNetworkAdapters

stAdapt = objAdapt.cName

For lgCount = 0 To UBound(stAdapt)


stMsg = stMsg & stAdapt(lgCount) & vbCrLf
Next

MsgBox stMsg

Exit Sub
End Sub

You might also like