View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Paul Robinson Paul Robinson is offline
external usenet poster
 
Posts: 208
Default macro to filter/print pages using certain criteria

Hi
By pages do you mean sheets? If sheets, do you want to filter based on
their sheet name??
In that case, something like

For each wks in ActiveWorkBook.Worksheets
If not CriteriaIsMet(wks.Name) then
Activeworkbook.Worksheets(wks.Name).Hidden = True
End If
Next wks

Where CriteriaIsMet is some Criteria you have based on the worksheet
name. This might involve the InStr function or Find Method - depends
how flexible you need your criteria to be.

regards
Paul

"mark" wrote in message ...
Hi,
This is just a followup to my other post. Excel doesn't
have functionality built-in to filter by pages. How
difficult would it be to write a macro for this and what
would be its general structure? Also, does anyone know if
an equivalent macro has already been written and possibly
available on the web?

Thanks,
Mark