ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add Autofilter to A1:Z1 on workbook (https://www.excelbanter.com/excel-programming/306573-add-autofilter-a1-z1-workbook.html)

Jako[_72_]

Add Autofilter to A1:Z1 on workbook
 
Please can someone tell me how to add an Autofilter on each worksheet in
my workbook (Programmatically) from A1 to Z1.

TIA


---
Message posted from http://www.ExcelForum.com/


William[_2_]

Add Autofilter to A1:Z1 on workbook
 
Hi Jako

Sub test()
Dim ws As Worksheet
For Each ws In Worksheets
ws.AutoFilterMode = False
ws.Columns("A:Z").AutoFilter
Next ws
End Sub

--
XL2002
Regards

William



"Jako " wrote in message
...
| Please can someone tell me how to add an Autofilter on each worksheet in
| my workbook (Programmatically) from A1 to Z1.
|
| TIA
|
|
| ---
| Message posted from
http://www.ExcelForum.com/
|




All times are GMT +1. The time now is 07:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com