Microsoft
Software
Hardware
Network
Question : SetFocus when a UserForm Displays
I have a form (UserForm1), that has ComboBox2 in it. It is one that the user can type in the box, and the list it is attached to will goto the entry that first brings with the first letters typed then second... etc.
How do I set the focus to that field in the comboxbox? I know it is something like: UserForm1.ComboBox2.SetFoc
us, but where does this go? I tried placing it just after the Show.UserForm1, but that did not work. Currently the user has to click the dropdown arrow to get to the selection that populate that list. I would rather that they can just hit a few keystrokes and get to their name in the list.
Any ideas? I thought there was some sort of UserForm1_initalize sort of command that I could place it under, but not seeing that either.
Please advise and thanks. -R-
Answer : SetFocus when a UserForm Displays
You're right... It goes in the Initialize event
Viewing the Code window, there are two combo boxes
The left: Lists the objects - select userform1 there..
The right: Lists the events- select initialize and the procedure will appear in the code.
Random Solutions
Registry cannot load the hive.
Getting Microsoft.Win32.RegistryKe<wbr />y from PROFILEINFO.hProfile - from PInvoke to .Net
Decommission temp DC in 2008, giong to 2008 R2 domain
Want to open form when file opens, but getting file/access error 75 message
VBA - Playing Movies using VLC or GOM Player
SQL Express 2005 ODBC Connection Error 67 and 17
Terminal Server - Outlook configures automatically when users login
Restoring a CString From a LPARAM
closing form without saving
Image Printing in Forms