![]() |
Autofilter
Hi , I have a table with autofilter at the bottom (it is in the row 500 ) of
my sheet , excel does not let me to unhide rows in the top of my sheet when the autofilter is activated , I am talking about the rows 1- 499 , it lets me unhide rows only when the autofilter is unactivated (looks like excel bug), so I am trying this : ActiveWorkbook.Worksheets("Sheet1").AutoFilterMode = False it sets unactivated the autofilter , after that I am hiding and showing the rows that I need , but after that I need to activate again the autofilter , I am trying : ActiveWorkbook.Worksheets("Part Appl Guidelines").AutoFilterMode = true but it does not work , it shows an error message, somebody can help me ? Thank you in advance. |
Autofilter
After of this :
ActiveWorkbook.Worksheets("Sheet1").AutoFilterMode = true I am doing this : ActiveWorkbook.Sheets("Sheet1").Range("F101").Auto Filter 2, "My criteria 1" I am getting the error message in this line. "Angeles" wrote: Hi , I have a table with autofilter at the bottom (it is in the row 500 ) of my sheet , excel does not let me to unhide rows in the top of my sheet when the autofilter is activated , I am talking about the rows 1- 499 , it lets me unhide rows only when the autofilter is unactivated (looks like excel bug), so I am trying this : ActiveWorkbook.Worksheets("Sheet1").AutoFilterMode = False it sets unactivated the autofilter , after that I am hiding and showing the rows that I need , but after that I need to activate again the autofilter , I am trying : ActiveWorkbook.Worksheets("Part Appl Guidelines").AutoFilterMode = true but it does not work , it shows an error message, somebody can help me ? Thank you in advance. |
Autofilter
I think you can set a sheet's AutoFilterMode to False but not to True.
VBA needs to know exactly where the headers are. Some ideas: Is there a gap between the top rows and the filter headers? I believe there needs to be one completely empty row above the headers. From your other post: the following line looks OK to me (I added argument names for clarity): ActiveWorkbook.Sheets("Sheet1").Range("F101").Auto Filter Field:=2, Criteria1:="My criteria 1" You might need to put the following line ABOVE that line: ActiveWorkbook.Sheets("Sheet1").Range("F101").Auto Filter Also: Are you sure of what the headers are in the region that has autofilter on it? "Field:=2" is correct only if you're filtering on the second header from the left. fyi: I figured out the above by recording a macro then looking at the produced code. good luck WHA On Nov 30, 8:27 am, Angeles wrote: Hi , I have a table with autofilter at the bottom (it is in the row 500 ) of my sheet , excel does not let me to unhide rows in the top of my sheet when the autofilter is activated , I am talking about the rows 1- 499 , it lets me unhide rows only when the autofilter is unactivated (looks like excel bug), so I am trying this : ActiveWorkbook.Worksheets("Sheet1").AutoFilterMode = False it sets unactivated the autofilter , after that I am hiding and showing the rows that I need , but after that I need to activate again the autofilter , I am trying : ActiveWorkbook.Worksheets("Part Appl Guidelines").AutoFilterMode = true but it does not work , it shows an error message, somebody can help me ? Thank you in advance. |
All times are GMT +1. The time now is 10:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com