View Single Post
  #5   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?


Using UserForm_Initialize() helped, but i still can't get the
worksheet variables to work in the UserForm code.


Dim StoreMoney as Double
Dim Money as Double 'Shouldn't have to do this again

Private Sub UserForm_Initialize()
Money = Sheet1.Range("E9") *' <<does work now - would rather just
' get it's value from
worksheet1 code
StoreMoney = 0
StoreText = "$" & StoreMoney ' <<does work now
End Sub


Thanks for the help