LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ComboBox_Change sub runs unexpectedly

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA macro runs fine, but freezes if I try to do ANYTHING else whileit runs Rruffpaw Setting up and Configuration of Excel 1 September 17th 11 01:25 PM
Cell Format changes unexpectedly HappyDaddy Excel Discussion (Misc queries) 1 October 7th 09 04:28 PM
Excel Closes Unexpectedly Lisa E. Excel Discussion (Misc queries) 3 December 12th 07 04:33 PM
Excel quits unexpectedly Simon Brown Excel Worksheet Functions 1 May 4th 07 11:36 PM
data changes unexpectedly Helen N. New Users to Excel 8 December 16th 04 03:49 PM


All times are GMT +1. The time now is 01:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"