![]() |
command button on worksheet
I have a worksheet which has 2 cells unprotected to accept a date and a
clientID respectively. I also have a commandbutton with a macro behind it to take the two cell values and pass them to a SQL query which returns results to another section of the worksheet. When using the sheet there is a tendency to input the date, tab to the client ID, key in the ID and then click on the command button. Unfortunately, until the client ID field has lost the focus, the command button has no effect. If the user presses <enter or tabs out of the clientID cell then the button works fine. I'm sure this must be easy to fix. I would really appreciate some help. Thanks. |
command button on worksheet
Actually, I don't think it is easy to fix. If the user remains in edit mode
(what you describe), then macro don't run. I think you could mitigate it by using Data validation in the clientID cell using the list option so the user is presented with a dropdown and choices to choose from. -- Regards, Tom Ogilvy "PhilC" wrote: I have a worksheet which has 2 cells unprotected to accept a date and a clientID respectively. I also have a commandbutton with a macro behind it to take the two cell values and pass them to a SQL query which returns results to another section of the worksheet. When using the sheet there is a tendency to input the date, tab to the client ID, key in the ID and then click on the command button. Unfortunately, until the client ID field has lost the focus, the command button has no effect. If the user presses <enter or tabs out of the clientID cell then the button works fine. I'm sure this must be easy to fix. I would really appreciate some help. Thanks. |
All times are GMT +1. The time now is 12:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com