|
-
Apr 28th, 2010, 04:54 PM
#1
Thread Starter
New Member
How to set back focus on a command button after it looses it due to some event
Hi All,
I have 4 command buttons commandbutton1 - 4 on my excel 'Sheet8'.
I want Bold-Font for whichever of the buttons 1 - 3 get focus.
Button 4 is just a settings button that doesn't need focus, it basically Opens up a UserForm when clicked.
I defined LostFocus() for buttons 1-3 and they work fine. They basically sort my columns for some names.
Now, when i click button 1, it gets focus, Bolds out its font, sorts out my columns on name "GGG". BUttons 2,3 work the same. But when i click button 4:
1) Last Button from 1-3 looses focus, UnBolds its font.(Expected)
2) UserForm opens, i click OK button to close it.
3) Now, none of my Buttons from 1-3 are selected, but my sheet is still shorted on one of my last active Buttons from 1-3.
I want one of the 3 buttons to either maintain its bold text, or regain focus back on closing UserForm, dunno how to identify the last active CommandButton before clicking Commandbutton4. How do i do that?
thanks
Mamu
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|