Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm attempting to trigger some VBA code and tried both the Calculate &
Activate events of both the Workbook & Worksheet objects, however neither seem to fire off. I can get Activate to trigger by switching sheets, but that doesn't work for me as I am relying on ActiveSheet. My XLT has a database query tied to it also, but apparently that doesn't trigger th Calculate event. What would be the best way to automatically trigger my code after the Workbook is open and after or while the underlying data is being retrieved? Thanks |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try the Worksheet_Change event. See http://www.cpearson.com/excel/events.htm
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zamdrist" wrote in message oups.com... I'm attempting to trigger some VBA code and tried both the Calculate & Activate events of both the Workbook & Worksheet objects, however neither seem to fire off. I can get Activate to trigger by switching sheets, but that doesn't work for me as I am relying on ActiveSheet. My XLT has a database query tied to it also, but apparently that doesn't trigger th Calculate event. What would be the best way to automatically trigger my code after the Workbook is open and after or while the underlying data is being retrieved? Thanks |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you Bob, that did work.
Now I just have to figure out how to not trigger that event when I open the template itself. Need to trigger the event, some event only when I open a workbook based on the template...like Word & auto_new or Document New event...I'll look over the site you sent me though. Thanks. Steve |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How about the Workbook open application event and check if the file opened
is that template? -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zamdrist" wrote in message ups.com... Thank you Bob, that did work. Now I just have to figure out how to not trigger that event when I open the template itself. Need to trigger the event, some event only when I open a workbook based on the template...like Word & auto_new or Document New event...I'll look over the site you sent me though. Thanks. Steve |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Bob Phillips wrote:
How about the Workbook open application event and check if the file opened is that template? Yep...that's what I did :) If ActiveWorkbook.Name = "SomeWorkbook.xlt" Then Exit Sub Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Displaying graph and charts on events | Excel Discussion (Misc queries) | |||
Finding concurrent events from a list with a start and an end time | Excel Discussion (Misc queries) | |||
Running Excel events even in edit mode.... | Excel Discussion (Misc queries) | |||
Calendar that automatically push events back one day. | Excel Discussion (Misc queries) | |||
Outlook 2003 calendar events into Excel 2003? | Excel Discussion (Misc queries) |