Results 1 to 3 of 3

Thread: Hey, mister guru...

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Location
    Montreal, Canada
    Posts
    14

    Wink

    Hi,

    I come from the Clipper programming.
    In Clipper you could do something like that:

    myMacro := "myVar" + "1"

    now myMacro is equal to "myVar1"
    if I use it in the code like this:

    for &(myMacro)=1 to 20
    ..
    next

    It will be the same as if i did this:

    for myVar1 = 1 to 20
    ..
    next

    Except that at run time I can pass any variable
    name into that loop.

    My question is, how to do the same thing in VB?

    Thanx!
    File not found!
    Abort, Retry, Get a Beer...

    L8r

  2. #2
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400
    I don't think you can. The only chance you have would be the Eval() function.

  3. #3
    Hyperactive Member dsy5's Avatar
    Join Date
    Jul 2000
    Location
    Lockport, NY
    Posts
    362
    I'm afraid that is a limitation of VB. I used that type of programming in the original
    FoxPro 2.0 - I sadly miss that feature.
    Donald Sy - VB (ab)user

Posting Permissions

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



Click Here to Expand Forum to Full Width