UserForms and ComboBoxs

J

Jon

Hi,

I've created a Userform with two Comboboxes contained
within it, however, I cannot get the second combobox to
return a value to a worksheet. It will however return the
value if I display the userform for a second time. I've
obviously left something out in the following code. Any
help would be greatly appreciated.

___________________________________________
Private Sub ComboBoxSecondWeek_Change()

CompWeek.Hide 'Name of UserForm

End Sub
___________________________________________

Private Sub UserForm_Initialize()

ComboBoxFirstWeek.MatchEntry = fmMatchEntryComplete
ComboBoxFirstWeek.ColumnCount = 1
ComboBoxFirstWeek.ControlSource
= "_first_week_select_comp" 'Rangename to return value to
ComboBoxFirstWeek.RowSource
= "_week_comparison_data_range" 'Selection List
ComboBoxFirstWeek.BoundColumn = 1

ComboBoxSecondWeek.MatchEntry = fmMatchEntryComplete
ComboBoxSecondWeek.ColumnCount = 1
ComboBoxSecondWeek.ControlSource
= "_second_week_select_comp" 'Rangename to return value to
ComboBoxSecondWeek.RowSource
= "_week_comparison_data_range"
ComboBoxSecondWeek.BoundColumn = 1

End Sub
___________________________________________

Many Thanks,
Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top