-
June 30th, 2005, 09:00 AM
#1
Registered User
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.
-
June 30th, 2005, 01:17 PM
#2
Have you considered an array of strings? That would be the safer, "more proper" way to code what you are wanting.
-
July 5th, 2005, 01:36 PM
#3
Registered User
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
-
By TechZ in forum Tech News
Replies: 5
Last Post: November 29th, 2004, 12:25 PM
-
By delmer_1 in forum Programming And Web Design
Replies: 2
Last Post: August 12th, 2003, 03:23 PM
-
By opiate in forum Programming And Web Design
Replies: 1
Last Post: December 4th, 2001, 03:39 AM
-
By elhit in forum Programming And Web Design
Replies: 10
Last Post: March 27th, 2001, 07:30 AM
-
By joelen in forum Tech-To-Tech
Replies: 8
Last Post: March 14th, 2001, 09:26 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks