View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Donny Donny is offline
external usenet poster
 
Posts: 11
Default How to run a macro when a form opens?

Looking back on it, the first section is all part of the (General)
category, while all the other Subs are in their own category. Is this
part of the problem? After searching the posts, I still can't find
how to get the variables (and their current values) from the worksheet
code into the userform code to use.

'-This is part of the (General) category---------------------
Dim StoreMoney as Double

Private Sub StoreForm_Activate()
Money = Sheet1.Range("E9") *' <<doesn't work - would rather just get
it's value from worksheet code
StoreMoney = 0
StoreText = "$" & StoreMoney ' <<doesn't work
End Sub
'---------------------------------------------------------------------------


Thanks for the help