Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Visual Basic - Access a specific variable
Closed Thread
Old 12-13-2004, 05:52 AM   #1 (permalink)
 
Newb Techie

Join Date: Dec 2004

Posts: 1

pmwhelan

Default Visual Basic - Access a specific variable

Say I have a variable
myvar = 1

and I have a few more variables
othervar1=27
othervar2=14
othervar3=8
othervar4=22
othervar5=120

how would i get at the value in othervar through myvar

ie if myvar = 1 it prints 27
if myvar = 3 it prints 8

thanks
paul
pmwhelan is offline  
Old 12-21-2004, 09:49 AM   #2 (permalink)
 
True Techie

Join Date: Dec 2004

Posts: 164

Skuzzle

Default

IF myvar = 1 THEN
print othervar1
END IF

or something along those lines
__________________
Skuzzle - Powered by Badgerbyte Web & IT Services
www.drive4fun.co.uk check it out
Skuzzle is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On