Combo Box VB Question & SW
Combo Box VB Question & SW
(OP)
I am in need of the code required to add a simple combo box to an existing macro. I would like to have the abilty to select an individual user name from a A pull down list.
Also is there an easy way to force upper case text in a text box?
Please be as descriptive and possibly provide the code as I am just beginning VB and have no clue.
Not sure if it's important but all of my code for the macro is associated with the userform.
Also is there an easy way to force upper case text in a text box?
Please be as descriptive and possibly provide the code as I am just beginning VB and have no clue.
Not sure if it's important but all of my code for the macro is associated with the userform.






RE: Combo Box VB Question & SW
RE: Combo Box VB Question & SW
Like the Tick said you insert the combobox into the form. Then in the vb editor enter:
'fill cbo box
'cbo_byl is the name of the combo box on the form
cbo_byl.AddItem " "
cbo_byl.AddItem "DH"
cbo_byl.AddItem "CB"
cbo_byl.AddItem "LAN"
RE: Combo Box VB Question & SW
RE: Combo Box VB Question & SW
The combobox will/can allow them to type in their own entries, and to catch THAT requires a lot more work.
RE: Combo Box VB Question & SW
Good luck.
Bradley
RE: Combo Box VB Question & SW
There are a couple of examples on the SWX website which can help you with this project. There is a vb custom property program in the model library which you can easily customize. I went a step further and integrated the custom property code into the SWX property manager page instead of using a separate form. I like this approach because it is completely integrated with the parent program. There is also an example showing how to create a property manager page using vba in the api section of the SWX website.
RE: Combo Box VB Question & SW
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
into the combo box KeyPress event. That way the user will only see upper case letters as they are typed.
Regg