How to auto-clear dependent dropdowns when parent cell is changed while using combobox to format list?

sirfred33

New Member
Joined
Mar 11, 2015
Messages
6
Hi there,

How do I auto-clear dependent dropdowns when the parent cell is changed, while using a combobox to format the dropdown lists?

The dropdown lists are datavalidated cells
and the size+font in the lists is formatted with an ActiveX combobox and coding
The parent cell is A9 and the dependent cells are B9:D9. I've tried the following which only works when I use the regular dropdown list, but not when using the dropdown formatted with combobox:
<code style="font-family: monospace, monospace; margin: 0px 2px; border: 0px; border-radius: 2px; display: block; font-size: 1em; line-height: 1.42857142857143em; padding: 0px !important; background-color: transparent;">Private Sub Worksheet_Change(ByVal Target As Range)

If Not Intersect(Target, Range("A9")) Is Nothing Then
Target.Offset(0, 1).ClearContents
Target.Offset(0, 2).ClearContents
Target.Offset(0, 3).ClearContents
Target.Offset(0, 4).ClearContents
End If
End Sub</code>

To get a better image of what's happening:



So the 3 dependent cells won't clear when using the dropdown formatted with combobox
This is the guide I've used to make the dropdowns with combobox (I use Code Sample 1): http://www.contextures.com/xlDataVal10.html


Long post I know, but I've tried finding a solution for some time and wanted to be sure my problem is understood.

Thanks for helping
 
This is a bit of a long shot, but MAY be in the theme of what you are trying to do with combo boxes...??

There is a link to a workbook, (not in English) but seemed to do some of what you ask.

VBA - How to create a cascading combo box in a userform

It puts them all on a userform and the dependent choices are deleted when a MAIN category is chosen.

Just a stab on my part, I admit.

Howard
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top