Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2007
    Posts
    61
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Help with VB scripting

    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

  • #2
    New Coder
    Join Date
    Jan 2008
    Location
    Lulworth, Dorset, England
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try a VB forum?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •