View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mike allen[_2_] mike allen[_2_] is offline
external usenet poster
 
Posts: 85
Default set variable once

is it possible to set a variable just once and have many subs use it?
example:

user = sheets("1").range("a1") 'i would like to have this set only once at
top of module sheet

sub temp1()
msgbox user 'i would like for this and many other subs to know what 'user'
is
end sub

i know i can define 'user' in a sub, then use sub temp1(user), but i would
rather not since there will be so many subs w/ 'user' needed. thanks, mike
allen