Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keeping variable values in SUBS and back-- HOW?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Help me! im making a program where i need the values of strings and integer variables to be accesable and usable between the main module and SUBs. i dont really get the whole DECLARE, STATIC, COMMON, SHARED kinda stuff. Well, declare i get. but can ya help me?

I'll try checking back in with this forum.

thanks
 
Use DIM SHARED at the beginning of your program, such as

DIM SHARED X as Integer, Y as STRING * 10, Z AS DOUBLE

That will let all subs use X, Y, Z just like they were parts of the main module.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top