PDA

View Full Version : Solved: Add autofilter to data on a worksheet that is not the active sheet



vanhunk
06-14-2013, 05:51 AM
I do not know if this is possible.

I want to add the autofilter arrows to data on a sheet that is not the active sheet. In other words, I would like to be able to do this with a macro, without having to select the sheet.

Thank you

snb
06-14-2013, 06:57 AM
Sub M_snb()
sheets("sheet2").cells(1).currentregion.autofilter
End Sub

vanhunk
06-14-2013, 07:09 AM
Thanks snb, good to know a master.