Command Button Issue

J

JK

Sometimes On_Click the CB on my sheet (created with the Control Toolbox)
continues to appear as if it's pressed down (even after the procedure it
calls finishes). But it looks odd. Can anyone suggest what I can do to
correct this strange behavior?

Thank you in advance.

Jim Kobzeff
 
R

Rob Bovey

JK said:
Sometimes On_Click the CB on my sheet (created with the Control Toolbox)
continues to appear as if it's pressed down (even after the procedure it
calls finishes). But it looks odd. Can anyone suggest what I can do to
correct this strange behavior?

Hi Jim,

Try putting the following lines of code at the beginning of the Click
event (if you're displaying a UserForm in the Click event, put them
immediately after you dismiss the UserForm):

Application.ScreenUpdating = False
Application.ScreenUpdating = True

This doesn't always work, but most of the time it will force Excel to
refresh its window and get the appearance back to normal prior to running a
long procedure.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top