Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default add-in procedures called from active workbook events

I have a procedure I wish to place into an add-in - simple enough done.
However, when this add-in is instaced I want this procedure to be called
from *any active* workbooks' Workbook_SheetSelectionChange(ByVal Sh As
Object, ByVal Target As Range) event. How is this done?

TIA
doco


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default add-in procedures called from active workbook events

The syntax for calling a macro in another file (no matter xls or xla) is:
Application.Run Macro:="'file_name'!macro_name"

But you won't be able to call the "Workbook_SheetSelectionChange". You
probably need to pull the code onto a separate Sub in a module. Or, you can
use a Sub in a module which executes the "Workbook_SheetSelectionChange".

Regards,
Edwin Tam

http://www.vonixx.com






"doco" wrote:

I have a procedure I wish to place into an add-in - simple enough done.
However, when this add-in is instaced I want this procedure to be called
from *any active* workbooks' Workbook_SheetSelectionChange(ByVal Sh As
Object, ByVal Target As Range) event. How is this done?

TIA
doco



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default add-in procedures called from active workbook events

You want to trap Application events. This can be done using a class module.
The procedure is outlined on Chip Pearson's website:

http://cpearson.com/excel/AppEvent.htm

John Green

"doco" wrote in message
...
I have a procedure I wish to place into an add-in - simple enough done.
However, when this add-in is instaced I want this procedure to be called
from *any active* workbooks' Workbook_SheetSelectionChange(ByVal Sh As
Object, ByVal Target As Range) event. How is this done?

TIA
doco



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
Slow to Open, Small Workbook <2MB, HTML Paste, VBA procedures Fred Excel Discussion (Misc queries) 0 February 5th 10 09:20 PM
Running procedures on events xl2003 ragtop73 Excel Programming 2 December 14th 05 02:25 PM
Worksheet_Activate Not Called When Opening Workbook Gaston Excel Programming 6 October 29th 04 09:49 PM
two procedures in the same sheet one a workbook even procedure R.VENKATARAMAN Excel Programming 2 September 8th 04 10:46 AM
Mouse over events for Active X objects in excel Shrinu Excel Programming 1 May 26th 04 10:42 PM


All times are GMT +1. The time now is 11:10 PM.

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

About Us

"It's about Microsoft Excel"