Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 400 on running Macro
I have created a little macro that:
1) Goes to a specific sheet; 2) Unhides a certain range of cells; This small macro works well for me. Coding is: Sub Yr1unhide() Sheets("Data").Select Application.Goto Reference:="Year1" Selection.EntireColumn.Hidden = False End Sub However I then tried to add in a filter so that only rows that have a value of "1" in the filter column (ES) are shown. But now when I run the macro a error box pops up with a value of 400 in it, and no other information. Sub Yr1unhide() Sheets("Data").Select Application.Goto Reference:="Year1" Selection.EntireColumn.Hidden = False Range("ES2").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="=1", Operator:=xlAnd End Sub Can anyone help? Regards James |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 400 on running Macro
I think you cannot hide/unhide a column once a filter has been applied.
This is an Excel limitation. Try removing the filter before. Regards, Karim |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 400 on running Macro
I think you cannot hide/unhide a column once a filter has been applied.
This is an Excel limitation. Try removing the filter before. Regards, Karim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error 400 when running Macro | Excel Discussion (Misc queries) | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Error Running a Macro | Excel Discussion (Misc queries) | |||
Error when running macro | Excel Programming |