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? |
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? |
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 |
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? |
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 |
All times are GMT +1. The time now is 11:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com