LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Run macro when excel workbook gains focus

Perry,
Have you tried the App_WindowActivate or WorkbookActivate events ?

NickHK

"Perry" wrote in message
ups.com...
I want to be able to run a macro in a spreadsheet (which is open but
out of focus) when the user re-select Excel as the active application.

I've tried Excel Application Events
Public WithEvents App As Application etc
but this only works when first opening Excel or a Workbook or oggling
between sheets.

As I say, I want to have an excel book open and every time the user
moves into Excel (with the sheet already in "view") from say Outlook or
any other application - Excel receing control - the Macro would run.

Can anyone help?

Thanks



 
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
How do I calculate monthly gains/losses in excel ragingriver30 New Users to Excel 2 May 23rd 10 01:51 PM
making gains or losses appear red or black in formula Blane Excel Worksheet Functions 1 April 5th 06 02:06 AM
gains/losses formulas kgeorge Excel Worksheet Functions 3 March 24th 06 09:25 PM
Excel macro takes focus from other programs RUL Excel Programming 3 August 9th 05 01:56 PM
Template for IRS form capital gains/losses R2005SC Excel Discussion (Misc queries) 0 January 17th 05 06:51 PM


All times are GMT +1. The time now is 12:48 AM.

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"