Jim,
Thanks again; yes that works.
Refining the idea... This add-in should only work on certain workbooks.
The user creates the workbook from a template but saves with any file name.
I thought I'd create a custom document property, Then check for that
document property before executing vba routines from the add-in.
Any thoughts on that?
Regards
Habib
--
www.DynExtra.com
A resource for the Microsoft Dynamics Community
Featuring FAQs, File Exchange and more
Current member count: 40
--------------------------------------------
Share your knowledge. Add your favorite questions and answers
Help add questions to this site! We want Your input.
--------------------------------------------
"Jim Thomlinson" <James_Thomlinson@owfg-Re-Move-This-.com> wrote in message
news:122C30DB-97F1-4180-BC18-(E-Mail Removed)...
> You need to catch the events at the application level. Here is a great
> resource on that...
>
> http://www.cpearson.com/excel/AppEvent.htm
> --
> HTH...
>
> Jim Thomlinson
>
>
> "HSalim[MVP]" wrote:
>
>>
>> I am working on creating an addin. This add-in adds a command bar to
>> Excel
>> and operates on the current workbook.
>> As the user moves between worksheets in the activeworkbook, I want to
>> execute code on the worksheet.activate event.
>> How do I do that?
>>
>> Thanks in advance for your help
>>
>> Regards
>>
>>
>> --
>> www.DynExtra.com
>> A resource for the Microsoft Dynamics Community
>> Featuring FAQs, File Exchange and more
>> Current member count: 40
>> --------------------------------------------
>> Share your knowledge. Add your favorite questions and answers
>> Help add questions to this site! We want Your input.
>> --------------------------------------------
>>
>>
>>