Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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.

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
Worksheet Command Button will not work willpwr Excel Worksheet Functions 0 May 16th 06 08:13 PM
Command Button to Hyperlink to a Different worksheet Mikeyboy Excel Programming 1 May 3rd 05 12:35 PM
How do I add a command button on a worksheet to "paste" from the . [email protected] Excel Worksheet Functions 3 March 13th 05 06:25 PM
How do I add a command button on a worksheet to "paste" from the . Jalifid Excel Worksheet Functions 0 March 13th 05 03:01 PM
login to worksheet from command button sil Excel Programming 1 February 19th 04 12:44 PM


All times are GMT +1. The time now is 12:35 PM.

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"