Computing.Net > Forums > Programming > VB Data/Read Command?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB Data/Read Command?

Reply to Message Icon

Name: stroke6463
Date: June 24, 2005 at 17:13:12 Pacific
OS: XP Pro
CPU/Ram: idk
Comment:

Hey I haven't used VB in awhile so I'm a little rusty. Is there some type of Read and Data command for VB? I'm trying to convert an old QB program to VB and it has the Read/Data command.

Data 10, 12, 14
Read x

Basically, I need a line of numbers I can read for input with a command in the VB program. I don't want to use a text file just because I don't want people to see the numbers. Thanks a lot.



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: June 24, 2005 at 18:10:23 Pacific
Reply:

There is no equivelant to the Read and Data comands in VB. Thats was DOS basic only.

However what VB does have the DOS Basic didn't have are more flexible Array functions.

Put the numbers in and array and read them with a For/next loop.

Dim MyArray(10) as integer

MyArray(0) = 34
Myarray(1) = 23
MyArray(2) = 56

and so on

Then read them with a loop.

For a = 0 to 10
Print MyArray(a)
Next

Stuart


0

Response Number 2
Name: stroke6463
Date: June 24, 2005 at 20:25:27 Pacific
Reply:

I'll just use that. It's a little bit of extra work but in the end it will have the same function. I was hoping for just a quick command so I didn't have to change it all. Thanks.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB Data/Read Command?

Reading data from a sound card www.computing.net/answers/programming/reading-data-from-a-sound-card/15506.html

VB Data Report Creation Problem www.computing.net/answers/programming/vb-data-report-creation-problem/4924.html

Access search in VB www.computing.net/answers/programming/access-search-in-vb/1684.html