Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Return to active cell after macro completes

After running a macro that was activated by a button, the button stays on
focus and I have to press the Escape Key to return to the active cell.
What can I do to prevent this?
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Return to active cell after macro completes

activecell.select

or

activecell activate

Dan

"Dave" wrote:

After running a macro that was activated by a button, the button stays on
focus and I have to press the Escape Key to return to the active cell.
What can I do to prevent this?
Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default Return to active cell after macro completes

activecell.select
But whic cell this is can depend on what your macro does.

Dan Hatola wrote:
activecell.select

or

activecell activate

Dan

"Dave" wrote:

After running a macro that was activated by a button, the button stays on
focus and I have to press the Escape Key to return to the active cell.
What can I do to prevent this?
Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Return to active cell after macro completes

If it's a command button from the Controls Toolbox, you can
TakeFocusOnClick=false.

NickHK

"Dave" ...
After running a macro that was activated by a button, the button stays on
focus and I have to press the Escape Key to return to the active cell.
What can I do to prevent this?
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
Return to active cell Alex.W Excel Discussion (Misc queries) 2 June 19th 07 11:35 PM
In macros, an instruction that will return the position of the Active Cell aca[_4_] Excel Programming 2 January 20th 06 10:50 PM
Need VBA macro to return active cell address (R1C1) Chuck Hague[_2_] Excel Programming 2 August 2nd 05 08:21 PM
how can I return the active row and active column? Greg Excel Programming 0 February 3rd 05 07:38 PM
Public variable is reset after addin macro completes - thread/focus pblm? hscowan Excel Programming 1 February 19th 04 09:07 PM


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