View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
KenInPortland KenInPortland is offline
external usenet poster
 
Posts: 9
Default Use the custom filter dialog in a macro

Thank you Hector. Works great! I appreciate it.

"Héctor Miguel" wrote:

hi, Ken !

I need some guidance.
I can use the recorder but don't understand how to initiate and put the parameters into an existing Excel dialog.
I hope this is doable.
I want to initiate the custom filter dialog box using a macro with the column fixed (say column E)
beginning at row 33 with parameters set to "contain" then allow a user to enter the two search words and perform the filter.
Then I need another macro to essentially do a "filter all" and display all the rows...


use the "ancient" xl4 macro-functions to "ask/show" *that* dialog to the user...
previously "send" a keystroke sequence to the parameters "preparation"...
and let the user to finish the job (i.e.)

assuming column E is the 5th filtered field in your layout...

Sub Show_CustomFiterDialog()
SendKeys "+{tab}{down}{end}{up}{tab}"
ExecuteExcel4Macro "filter?(5)"
End Sub

there are several ways to "show all" and/or quit the autofilter mode

regards,
hector.