Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have put a simple combobox in to my form and have coded the values for the drop down in the VBA, looking like this Private Sub cboRegion_Change() End Sub Private Sub UserForm1_Initialize() With cboRegion .AddItem "NW" .AddItem "SW" .AddItem "SE" .AddItem "NE" End With cboRegion.Value = "" End Sub I have checked that the combobox name is the same but every time I run it, I get none of the above values, am I doing something really silly. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Remove the "1" from your "UserForm1_Initialize" declaration... You should
really just select the event procedures from the drop down list provided rather than type them in manually. Rick "Phil" wrote in message ... Hi, I have put a simple combobox in to my form and have coded the values for the drop down in the VBA, looking like this Private Sub cboRegion_Change() End Sub Private Sub UserForm1_Initialize() With cboRegion .AddItem "NW" .AddItem "SW" .AddItem "SE" .AddItem "NE" End With cboRegion.Value = "" End Sub I have checked that the combobox name is the same but every time I run it, I get none of the above values, am I doing something really silly. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Rick
Thanks for that, thought it would be something stupid like that, teach me to do these types of things so late at night. Thanks Again, Phil "Rick Rothstein (MVP - VB)" wrote: Remove the "1" from your "UserForm1_Initialize" declaration... You should really just select the event procedures from the drop down list provided rather than type them in manually. Rick "Phil" wrote in message ... Hi, I have put a simple combobox in to my form and have coded the values for the drop down in the VBA, looking like this Private Sub cboRegion_Change() End Sub Private Sub UserForm1_Initialize() With cboRegion .AddItem "NW" .AddItem "SW" .AddItem "SE" .AddItem "NE" End With cboRegion.Value = "" End Sub I have checked that the combobox name is the same but every time I run it, I get none of the above values, am I doing something really silly. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i make the whole y axis label show up it wont show the end | Charts and Charting in Excel | |||
Using a listbox/combo box to show two values | Excel Programming | |||
form wont show? | Excel Programming | |||
Combo box wont change selection? | Excel Programming | |||
Configure Combo Box to Show Unique List Values Only? | Excel Programming |