Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worksheet
How do you get a macro to run whenever a worksheet is opened -- Darren ----------------------------------------------------------------------- DarrenG's Profile: http://www.excelforum.com/member.php...fo&userid=3652 View this thread: http://www.excelforum.com/showthread.php?threadid=56506 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worksheet
Darren,
Open the ThisWorkbook module and enter you code in the: Private Sub Workbook_Open() End Sub NickHK "DarrenG" wrote in message ... How do you get a macro to run whenever a worksheet is opened? -- DarrenG ------------------------------------------------------------------------ DarrenG's Profile: http://www.excelforum.com/member.php...o&userid=36529 View this thread: http://www.excelforum.com/showthread...hreadid=565060 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worksheet
Hi Darren,
Try: '============= Private Sub Workbook_Open() Call MyMacro End Sub '<<============= This is workbook event code and should be pasted into the workbook's ThisWorkbook module *not* a standard module or a sheet module: Right-click the Excel icon on the worksheet (or the icon to the left of the File menu if your workbook is maximised) Select 'View Code' from the menu and paste the code. Alt-F11 to return to Excel. --- Regards, Norman "DarrenG" wrote in message ... How do you get a macro to run whenever a worksheet is opened? -- DarrenG ------------------------------------------------------------------------ DarrenG's Profile: http://www.excelforum.com/member.php...o&userid=36529 View this thread: http://www.excelforum.com/showthread...hreadid=565060 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worksheet
Private Sub Worksheet_Activate()
'your code here End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "DarrenG" wrote in message ... How do you get a macro to run whenever a worksheet is opened? -- DarrenG ------------------------------------------------------------------------ DarrenG's Profile: http://www.excelforum.com/member.php...o&userid=36529 View this thread: http://www.excelforum.com/showthread...hreadid=565060 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worksheet
Hi Darren,
I misread your request. If you mean worksheet, as stated, and not workbook, use the code suggested by Bob. --- Regards, Norman |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worksheet
:) Perfect, thanks. : -- Darren ----------------------------------------------------------------------- DarrenG's Profile: http://www.excelforum.com/member.php...fo&userid=3652 View this thread: http://www.excelforum.com/showthread.php?threadid=56506 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007, Automatically open new worksheet on open. | Excel Discussion (Misc queries) | |||
My desktop worksheet shortcut will not open the Excel Worksheet | Excel Discussion (Misc queries) | |||
How do I get a blank worksheet to open up when I open Excel? | Setting up and Configuration of Excel | |||
'Save current worksheet'; 'Open next worksheet' - two command buttons | Excel Discussion (Misc queries) | |||
How do I get my personal macro worksheet to open whenever I open . | Excel Discussion (Misc queries) |