LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How to run a macro when a form opens?

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opens to form then keep focus and unable to get to code - HELP!! Kaz G Excel Discussion (Misc queries) 0 January 23rd 08 01:16 AM
Is it possible to open only form when an excel file opens... SupperDuck Excel Programming 2 July 2nd 07 10:56 PM
Select page tab when form opens [email protected] Excel Programming 4 December 6th 06 06:10 PM
Load form when workbook opens anna Excel Programming 2 August 2nd 06 11:22 PM
Load form when workbook opens [email protected] Excel Discussion (Misc queries) 2 July 19th 06 03:32 AM


All times are GMT +1. The time now is 07:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"