Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Activate Not Called When Opening Workbook
I'm using code in the Worksheet_Activate event to load a Menu. This works
fine when manually switching from one worksheet to another. However, when the workbook is first opened, this event is not issued for the active sheet. How can I get this event to run when the workbook is first opened. The active sheet can be any sheet that the user had activated prior to the last worbook close. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Activate Not Called When Opening Workbook
You could either add it to the workbook_open event (but what happens if the
activesheet is some other?), or maybe check in workbook_open if that sheet is active and then load it. -- HTH RP "Gaston" wrote in message ... I'm using code in the Worksheet_Activate event to load a Menu. This works fine when manually switching from one worksheet to another. However, when the workbook is first opened, this event is not issued for the active sheet. How can I get this event to run when the workbook is first opened. The active sheet can be any sheet that the user had activated prior to the last worbook close. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Activate Not Called When Opening Workbook
Gaston,
Use the WorkBook_Open event and check the Activesheet. If it's the one(s) that uses the toolbar then run your toolbar load code. hth, Doug Glancy "Gaston" wrote in message ... I'm using code in the Worksheet_Activate event to load a Menu. This works fine when manually switching from one worksheet to another. However, when the workbook is first opened, this event is not issued for the active sheet. How can I get this event to run when the workbook is first opened. The active sheet can be any sheet that the user had activated prior to the last worbook close. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Activate Not Called When Opening Workbook
Bob,
I was wondering, are you no longer "looking out across Poole Harbour to the Purbecks?" At one point I Googled it and it looks like a beautiful part of the planet. I had also thought of signing myself as "looking across my stomach tomy toes" - my relaxed laptop position - but wasn't sure if you would appreciate the attempt at humor. Doug Glancy "Bob Phillips" wrote in message ... You could either add it to the workbook_open event (but what happens if the activesheet is some other?), or maybe check in workbook_open if that sheet is active and then load it. -- HTH RP "Gaston" wrote in message ... I'm using code in the Worksheet_Activate event to load a Menu. This works fine when manually switching from one worksheet to another. However, when the workbook is first opened, this event is not issued for the active sheet. How can I get this event to run when the workbook is first opened. The active sheet can be any sheet that the user had activated prior to the last worbook close. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Activate Not Called When Opening Workbook
One way: Change the Worksheet_Activate event from Private to Public, then
add the following to ThisWorkbook module: Private Workbook_Open() Worksheets("MySheet").Worksheet_Activate End Sub HTH, -- George Nicholson Remove 'Junk' from return address. "Gaston" wrote in message ... I'm using code in the Worksheet_Activate event to load a Menu. This works fine when manually switching from one worksheet to another. However, when the workbook is first opened, this event is not issued for the active sheet. How can I get this event to run when the workbook is first opened. The active sheet can be any sheet that the user had activated prior to the last worbook close. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Activate Not Called When Opening Workbook
Hi Doug,
With the weather that we are having at the moment, I can hardly the harbour, never mind across it. From work, high on the 5th floor I can usually glimpse them at the moment. That signature was inspired by a guy in the travel groups who signed himself as looking out across one of the lakes in the lake district (Windermere IIRC), and I thought, this is a lovely place as well, a bit more built-up perhaps, but really nice, so I penned mine. I also recall many other humorous ripostes to that one, such as 'looking down my garden to the British Rail woolshed's, et al. A change from the Zen mantras I fell<vbg. Bob "Doug Glancy" wrote in message ... Bob, I was wondering, are you no longer "looking out across Poole Harbour to the Purbecks?" At one point I Googled it and it looks like a beautiful part of the planet. I had also thought of signing myself as "looking across my stomach tomy toes" - my relaxed laptop position - but wasn't sure if you would appreciate the attempt at humor. Doug Glancy "Bob Phillips" wrote in message ... You could either add it to the workbook_open event (but what happens if the activesheet is some other?), or maybe check in workbook_open if that sheet is active and then load it. -- HTH RP "Gaston" wrote in message ... I'm using code in the Worksheet_Activate event to load a Menu. This works fine when manually switching from one worksheet to another. However, when the workbook is first opened, this event is not issued for the active sheet. How can I get this event to run when the workbook is first opened. The active sheet can be any sheet that the user had activated prior to the last worbook close. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Activate Not Called When Opening Workbook
Thanks. This was the answer.
Gaston "George Nicholson" wrote: One way: Change the Worksheet_Activate event from Private to Public, then add the following to ThisWorkbook module: Private Workbook_Open() Worksheets("MySheet").Worksheet_Activate End Sub HTH, -- George Nicholson Remove 'Junk' from return address. "Gaston" wrote in message ... I'm using code in the Worksheet_Activate event to load a Menu. This works fine when manually switching from one worksheet to another. However, when the workbook is first opened, this event is not issued for the active sheet. How can I get this event to run when the workbook is first opened. The active sheet can be any sheet that the user had activated prior to the last worbook close. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SIZE Window, Tile, Worksheet, Workbook, Whatever it's called. | New Users to Excel | |||
When I open a workbook, another one called Book1 is also opened. W | Excel Discussion (Misc queries) | |||
why is an Excel file called a workbook? | Excel Discussion (Misc queries) | |||
Opening a UserForm causes a crash in the Exit procedure (Which is never called) | Excel Programming | |||
how to make subs/procs can only be called from within the workbook they belong to? | Excel Programming |