Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet Command Button will not work | Excel Worksheet Functions | |||
Command Button to Hyperlink to a Different worksheet | Excel Programming | |||
How do I add a command button on a worksheet to "paste" from the . | Excel Worksheet Functions | |||
How do I add a command button on a worksheet to "paste" from the . | Excel Worksheet Functions | |||
login to worksheet from command button | Excel Programming |