Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting when Autofilter drop-down changes

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
Is there the equivalent of a Change event for the drop-down box shown by the AutoFilter facility? What I would like to do is apply some bordering to a certain set of cells immediately after the user has selected an item in the Autofilter drop-down box.

Clive [infinity]
Ex nihilo, nihil fit (Out of nothing, nothing comes)
 
Nope - no change event associated with autofilter I'm afraid
You could stick a SUBTOTAL somewhere on the sheet which references the autofilter region. When autofilter changes, subtotal will recalc as it works on visible cells only
Then use the calculate event to make the formatting changes

Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
 
Thanks for the reply Geoff. I've been a bit stupid cos I've just realised there's an easier (and rather obvious) way to do it. If I apply bordering to the entire list before any selection is made from the auto-filter combobox then it retains and shows the bordering for the selection made from the combobox.

Basically, what I was doing before was programmatically selecting an item from the combobox, then I was trying to apply bordering to whatever cells were shown. Whereas it makes sense to apply bordering first then make a selection. Comprendez? Or have I confused the life out of you! ;-)

Clive [infinity]
Ex nihilo, nihil fit (Out of nothing, nothing comes)
 
Comprendez indeed - always nice when you work out how simple it could be - especially if you havn't spent weeks trying to figure it out ;-)

Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top