PC Review


Reply
Thread Tools Rate Thread

Add-ins and Worksheet activate

 
 
HSalim[MVP]
Guest
Posts: n/a
 
      31st May 2007

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.
--------------------------------------------


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      31st May 2007
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.
> --------------------------------------------
>
>
>

 
Reply With Quote
 
HSalim[MVP]
Guest
Posts: n/a
 
      31st May 2007
Perfect! Sounds like just what I want.
Thank you.
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.
>> --------------------------------------------
>>
>>
>>



 
Reply With Quote
 
HSalim[MVP]
Guest
Posts: n/a
 
      6th Jun 2007
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.
>> --------------------------------------------
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
trigger worksheet activate event in another worksheet Raj Microsoft Excel Programming 2 2nd Jun 2008 01:09 PM
Change Worksheet Button Caption on Worksheet.Activate =?Utf-8?B?TWlrZVp6?= Microsoft Excel Programming 1 7th Dec 2006 06:01 AM
Activate Previous worksheet after adding a new worksheet Chingangel@yahoo.com Microsoft Excel Programming 3 19th Oct 2005 01:01 AM
Activate Worksheet =?Utf-8?B?Y290dGFnZTY=?= Microsoft Excel Programming 1 21st Apr 2005 06:46 PM
Worksheet.activate =?Utf-8?B?SmVmZg==?= Microsoft Excel Misc 1 14th Dec 2004 01:52 PM


Features
 

Advertising
 

Newsgroups
 


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