Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have created a sheet with several sets of comboboxes. The second box is populated by the choice selected in the first (they are set up in pairs). When the 2nd box is changed, certain worksheet cells (F10:U10) are unlocked for editing by the "Allowhours" sub. For some reason the Combobox2 sub runs every time the values of F10:U10 are changed. I have included code below. I know the "rng as string" part is weird, but it works! There is no other link to the F10:U10 cells (from what I can tell) other than the reference below. If the "Call AllowHours" line is in box1, there is no problem. I would appreciate any suggestion as to why box2_change runs constantly (I also tried the "_click" event on 2 with no success). THANK YOU IN ADVANCE!
Private Sub ComboBox1_change( Dim rng As Strin rng = "WorkPackage!B20:B6 ComboBox2.ListIndex = ComboBox2.ListFillRange = (rng End Su Private Sub ComboBox2_change( Dim HourRange2 As Rang Set HourRange2 = Range("F10:U10" If ComboBox1.ListIndex < 0 And ComboBox2.ListIndex < 0 Then Call Allowhours(HourRange2, ComboBox2.ListIndex End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA macro runs fine, but freezes if I try to do ANYTHING else whileit runs | Setting up and Configuration of Excel | |||
Cell Format changes unexpectedly | Excel Discussion (Misc queries) | |||
Excel Closes Unexpectedly | Excel Discussion (Misc queries) | |||
Excel quits unexpectedly | Excel Worksheet Functions | |||
data changes unexpectedly | New Users to Excel |