PC Review


Reply
Thread Tools Rate Thread

ActiveX combobox

 
 
aqualibra
Guest
Posts: n/a
 
      22nd Aug 2008
I am using activeX to create both my combobox and buttons. I have 2
comboboxes. Combobox11 is dependent on combobox10. My program is as follows:

Sub Combobox10_enter()
Me.ComboBox10.Clear
Me.ComboBox10.AddItem (Sheets("Input").Range("M57"))
Me.ComboBox10.AddItem (Sheets("Input").Range("M58"))
Me.ComboBox10.AddItem (Sheets("Input").Range("M59"))
Me.ComboBox10.AddItem (Sheets("Input").Range("M60"))
End Sub

Sub Combobox11_enter()
If Me.ComboBox10 = Range("M60") Then
Me.ComboBox11.Clear
Me.ComboBox11.AddItem (Sheets("Input").[N59])
Else
Me.ComboBox11.Clear
Me.ComboBox11.AddItem (Sheets("Input").Range("N57"))
Me.ComboBox11.AddItem (Sheets("Input").Range("N58"))
End If
End Sub

Is there a way such that when I make changes to combobox10, combobox11
automatically gets reset. Right now it still shows the last option selected.
Thanks.

 
Reply With Quote
 
 
 
 
Héctor Miguel
Guest
Posts: n/a
 
      24th Aug 2008
hi, !

it's not so clear what you really try to do @ enter into combobox11 -?-

try adding a line with ComboBox11.Clear in your ComboBox10_Change event -?-

hth,
hector.

__ OP __
> I am using activeX to create both my combobox and buttons.
> I have 2 comboboxes. Combobox11 is dependent on combobox10. My program is as follows:
>
> Sub Combobox10_enter()
> Me.ComboBox10.Clear
> Me.ComboBox10.AddItem (Sheets("Input").Range("M57"))
> Me.ComboBox10.AddItem (Sheets("Input").Range("M58"))
> Me.ComboBox10.AddItem (Sheets("Input").Range("M59"))
> Me.ComboBox10.AddItem (Sheets("Input").Range("M60"))
> End Sub
>
> Sub Combobox11_enter()
> If Me.ComboBox10 = Range("M60") Then
> Me.ComboBox11.Clear
> Me.ComboBox11.AddItem (Sheets("Input").[N59])
> Else
> Me.ComboBox11.Clear
> Me.ComboBox11.AddItem (Sheets("Input").Range("N57"))
> Me.ComboBox11.AddItem (Sheets("Input").Range("N58"))
> End If
> End Sub
>
> Is there a way such that when I make changes to combobox10, combobox11 automatically gets reset.
> Right now it still shows the last option selected.



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Item To ActiveX ComboBox Daniel Jones Microsoft Excel Programming 17 31st Aug 2009 10:51 PM
Using ActiveX combobox controls... Carmine Microsoft Excel Programming 0 21st Mar 2008 05:18 AM
How can I use VBA to set the value of an ActiveX ComboBox =?Utf-8?B?SGFycnkgRi4=?= Microsoft Excel Programming 6 13th Jul 2007 10:32 PM
publish activeX combobox and other activeX control =?Utf-8?B?aXJlbmUgYw==?= Microsoft Excel Programming 0 19th Mar 2007 07:19 AM
Combobox | Activex Controls | Tab gduron Microsoft Excel Discussion 0 3rd May 2006 01:16 AM


Features
 

Advertising
 

Newsgroups
 


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