Thread: Use a variabel
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Use a variabel

But if the userform is not loaded, it will have no value. Unloading the form
clears the variables, so that's no good.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sharad" wrote in message
...
A variabel named in a form (general)


Just in the same place change Dim to Public
e.g. Public vairable1.

Then in the module you can access it with the userfromname.

e.g.: userform1.variable1
But keep in mind that, by using it as above in a module, during run
time if the userform is not loaded it will get loaded (only loaded not
shown.)

Sharad

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!