...

View Full Version : Help with VB scripting



amol0010
05-19-2009, 04:43 PM
Hi..

i am making a subroutine, where it needs to loop through an array. here it is:

sub process()
Set objComputer = GetObject(strDomain )
objComputer.Filter = Array( "User" )
For Each objUser In objComputer
strName = objUser.Name
GetUserName(strName)
while strDN=""
CheckForUser()' sub routine to check for user Existance & bind to if found
if strDN = "" then
ReCheckUser()
end If
Wend
GetUserAccount(strDN)
GetLastLogon()
DisplayUserIE()
Next
End Sub

I have made a variable strName that set to a new value according to the array index being increased for 1 to the length of the array. Is that the correct way to do it ?


I am trying to do something similar to this in C :



for(j=0;j<10;)
{
j = j+1;
}

in this loop, the value of j keeps increasing from 0 to 10.

My Point, is the variable strName should act similar to j here in C.


Is that the correct syntax I am using ?

Thanks,
Amol

cantthinkofanic
05-19-2009, 08:16 PM
Try a VB forum?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum