Results 1 to 2 of 2

Thread: Variable from multiple string

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    21

    Variable from multiple string

    Hi

    I have many string variables named like : c1, c2, c3, c4, c5 ... and I would like to test them all at the same time with a command like that :

    for i = 1 to 100 (number of variables)
    if (c+i) = "xxxxxx" then
    ..........
    end if
    next i

    How can I do that ? If (c+i) doesn't work.

    Thanks for helping

  2. #2
    Hyperactive Member guyvdn's Avatar
    Join Date
    Oct 2002
    Location
    Belgium
    Posts
    336

    Re: Variable from multiple string

    Make an array of strings variable instead of many string variables.

    VB Code:
    1. Dim c(100) AS String
    2.  
    3. for i = 1 to 100
    4.   if c(i) = "xxxxxx" then
    5.     ..........
    6.   end if
    7. next i
    To deny our own impulses is to deny the very thing that makes us human

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