same string for all subs

smiler44

Registered User.
Local time
Today, 20:21
Joined
Jul 15, 2008
Messages
671
is it possible to have the same string and counter values in a sub routine, avilable to all the sub routines in that module? if so how?

how can I get textbox1 to display the word hi using two subs?

for example:-

sub one()
dim sell as string
sell = "hi"
end sub

sub two()
textbox1.text = sell
end sub

smiler44
 
Declare the variable at the top of that module to have it available to all subs in the module.
 
Thank you. I dont know why I could not see that earlier. I may have declared the string at the top as you said and then again in the first sub which I just did. took me a minute or two and half a dozen attempts to see what I had done.

thnaks again
smiler44:)
 

Users who are viewing this thread

Back
Top Bottom