How to run a macro when a form opens?
Try this
Private Sub UserForm_Activate()
Money = Sheet1.Range("E9") '<<doesn't work
StoreMoney = 0
StoreText = "$" & StoreMoney '<<doesn't work
End Sub
For me this now picks up the value of (codename) sheet1
Storetext is doing exactly what you are telling it to do and holds $0
Mike
"Donny" wrote:
I need to run a macro when I open a user form. It doesn't seem to
work like the workbook_open() line works. Also, I can't seem to
figure out how to give and take info from my worksheet and worksheet
variables to the form. ie- the variables in the worksheet macros
don't work in the userform macros. how do i delcare these and keep
there current values?
Private Sub StoreForm_Open()
Money = Sheet1.Range("E9") '<<doesn't work
StoreMoney = 0
StoreText = "$" & StoreMoney'<<doesn't work
End Sub
Thanks, Chris
|