Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ADK ADK is offline
external usenet poster
 
Posts: 89
Default Command Buttons

After the user clicks the command button and
the code executes, the button is still focused.
In code I only know to place Range("A7").Select to unfocus the button.
Without this line the button remains focused. If you press the Esc key it
unfocuses. I would like the result to be similar to the Esc key with having
to select a cell. Possible? How?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Command Buttons

Hi ADK

See the TakeFocusOnClick property of the button


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"ADK" wrote in message ...
After the user clicks the command button and
the code executes, the button is still focused.
In code I only know to place Range("A7").Select to unfocus the button.
Without this line the button remains focused. If you press the Esc key it
unfocuses. I would like the result to be similar to the Esc key with having
to select a cell. Possible? How?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Command Buttons

After the user clicks the command button and
the code executes, the button is still focused.
In code I only know to place Range("A7").Select to unfocus the button.
Without this line the button remains focused. If you press the Esc key it
unfocuses. I would like the result to be similar to the Esc key with
having
to select a cell. Possible? How?


A kludge solution would be to add this line as the **last** line of your
Click event code...

SendKeys "{ESC}"

but I see nothing wrong with the "select a cell" method where you would make
this your **last** line of code...

ActiveCell.Select

Rick

  #4   Report Post  
Posted to microsoft.public.excel.programming
ADK ADK is offline
external usenet poster
 
Posts: 89
Default Command Buttons

Thanks Ron

"Ron de Bruin" wrote in message
...
Hi ADK

See the TakeFocusOnClick property of the button


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"ADK" wrote in message
...
After the user clicks the command button and
the code executes, the button is still focused.
In code I only know to place Range("A7").Select to unfocus the
button.
Without this line the button remains focused. If you press the Esc key it
unfocuses. I would like the result to be similar to the Esc key with
having
to select a cell. Possible? How?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Command Buttons

You had a response at your other post.

ADK wrote:

After the user clicks the command button and
the code executes, the button is still focused.
In code I only know to place Range("A7").Select to unfocus the button.
Without this line the button remains focused. If you press the Esc key it
unfocuses. I would like the result to be similar to the Esc key with having
to select a cell. Possible? How?


--

Dave Peterson
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
Command Buttons Hoyas07 Excel Discussion (Misc queries) 2 February 11th 08 03:42 PM
Command buttons Jock W Excel Programming 1 February 22nd 05 12:35 PM
Command buttons etc TimO Excel Programming 1 July 28th 04 06:55 AM
Control Buttons vs. Command Buttons Robert Gibson Excel Programming 1 October 13th 03 04:33 PM
Command buttons not available Donna Brooks Excel Programming 0 August 25th 03 04:23 PM


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