Variable Variable Names (VB)
Results 1 to 3 of 3

Thread: Variable Variable Names (VB)

  1. #1
    Registered User Akuma's Avatar
    Join Date
    Nov 2001
    Location
    The Void
    Posts
    826

    Variable Variable Names (VB)

    Good Morning,
    Here is the issue that I am having. I need to pick apart a large string value and break it down into different smaller strings. I have five variables to use called Line1, Line2, Line3, Line4, and Line5. In earlier versions of VB, I was able to accomplish this by doing:

    ("Line" & Format(x)) where x is an incrementing variable from 1 to 5.

    In the more recent versions of VB howeve, this code errors. Any ideas would be greatly appreciated. Thank you.
    Sooouuuushi!

  2. #2
    Registered User
    Join Date
    Sep 2000
    Posts
    218
    Have you considered an array of strings? That would be the safer, "more proper" way to code what you are wanting.

  3. #3
    Registered User 10of40's Avatar
    Join Date
    Aug 2002
    Location
    Unimatrix W-2
    Posts
    78
    Yeah, an array of strings would be much more efficient (and a heck of a lot more proper).
    So it becomes:
    Code:
    Line(Format(x)) 'where x is an incrementing variable from 1 to 5
    "I aspire sir, to be better than I am." -- Data, Star Trek: Nemesis

Similar Threads

  1. Domain names in Arabic on way.
    By TechZ in forum Tech News
    Replies: 5
    Last Post: November 29th, 2004, 12:25 PM
  2. VB Form layout issue
    By delmer_1 in forum Programming And Web Design
    Replies: 2
    Last Post: August 12th, 2003, 03:23 PM
  3. HELP ME HELP ME HELP ME! VB & Crystal Reports
    By opiate in forum Programming And Web Design
    Replies: 1
    Last Post: December 4th, 2001, 03:39 AM
  4. [RESOLVED] SQL or VB??
    By elhit in forum Programming And Web Design
    Replies: 10
    Last Post: March 27th, 2001, 07:30 AM
  5. [RESOLVED] Red lines under folder names
    By joelen in forum Tech-To-Tech
    Replies: 8
    Last Post: March 14th, 2001, 09:26 AM

Bookmarks

Posting Permissions

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