SetFocus: conditional use of
I have trouble making the *control with focus * a subject of a condition. Eg. if Commanbutton x has the focus at launch time, I would want to put it out of commission (disable it). As I exit the UserForm (with 48 CmdButtons), the focus could be set on any one of them. Upon re-opening, the intention is to disable the last button that had the focus for the entire duration of the next rsession. What is the right syntax to use? The following failed with "Compile Error Expected Function or Variable" message. If CommandButton3.SetFocus Then ...... End if David -- davidm ------------------------------------------------------------------------ davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645 View this thread: http://www.excelforum.com/showthread...hreadid=480990 |
All times are GMT +1. The time now is 05:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com