ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Command Button Issue (https://www.excelbanter.com/excel-programming/318305-command-button-issue.html)

JK

Command Button Issue
 
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



Rob Bovey

Command Button Issue
 
"JK" wrote in message news:8W8sd.2302$PL1.216@trnddc09...
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 *





All times are GMT +1. The time now is 04:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com