Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Understand Workbook/Worksheet Events

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Understand Workbook/Worksheet Events

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Understand Workbook/Worksheet Events

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Understand Workbook/Worksheet Events

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Understand Workbook/Worksheet Events

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
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
Displaying graph and charts on events soteman Excel Discussion (Misc queries) 0 July 10th 06 08:15 PM
Finding concurrent events from a list with a start and an end time Dave at tch Excel Discussion (Misc queries) 3 January 13th 06 04:00 PM
Running Excel events even in edit mode.... Ishika Excel Discussion (Misc queries) 0 June 16th 05 06:53 PM
Calendar that automatically push events back one day. data3501 Excel Discussion (Misc queries) 1 February 3rd 05 01:00 AM
Outlook 2003 calendar events into Excel 2003? Kolin Tregaskes Excel Discussion (Misc queries) 4 January 31st 05 07:30 AM


All times are GMT +1. The time now is 06:47 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"