Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
I have a ComboBox on a UserForm. The TextBoxes on the form are populated according to the ComboBox selection, using the Change event of the ComboBox. The user can change the values in the ComboBox, and I want these changes to be stored on a hidden worksheet so that these repopulate the ComboBox when needed. I thought I'd change the ComboBox's ControlSource on the AfterUpdate event, but by this stage ListIndex has been lost (reverted to -1). I've tried using other events, but am getting nowhere. Any suggestions? Thanks in advance Paul Martin Melbourne, Australia |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Combobox1_Click()
Dim rng as Range, idex as Long sStr = Combobox1.RowSource set rng = Range(Combobox1.RowSource) idex = Combobox1.ListIndex Combobox1.RowSource = "" ' make your changes, ' then reset the rowsource. Determine new one or use sStr Combobox1.RowSource = "something" End Sub -- Regards, Tom Ogilvy "Paul Martin" wrote in message oups.com... Hi All I have a ComboBox on a UserForm. The TextBoxes on the form are populated according to the ComboBox selection, using the Change event of the ComboBox. The user can change the values in the ComboBox, and I want these changes to be stored on a hidden worksheet so that these repopulate the ComboBox when needed. I thought I'd change the ComboBox's ControlSource on the AfterUpdate event, but by this stage ListIndex has been lost (reverted to -1). I've tried using other events, but am getting nowhere. Any suggestions? Thanks in advance Paul Martin Melbourne, Australia |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK, I didn't think about clearing RowSource. Simple, but clever.
Thanks Tom Paul Martin Melbourne, Australia |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet Combobox | Excel Discussion (Misc queries) | |||
Another ComboBox Issue | Excel Programming | |||
Another ComboBox Issue | Excel Programming | |||
Copying Worksheet triggers Click event of combobox on another worksheet | Excel Programming | |||
Show one range in a combobox and write the 2nd range! | Excel Programming |