Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello everyone,
I screwed something up that worked just fine earlier on but now it no longer does. This line of code still works from the immediate window, even though the range is on a not-active sheet: Range("HeaderWeek").AutoFilter Field:=3, Criteria1:=4 Criteria1 in my original code is actually a string-variable, which is also named HeaderWeek. Since the original code failed, I hard-coded Criteria1 to "4" (or just 4, doesn't matter from the immediate window where it does work), but still it doesn't work in the original code. The error I get is: Method 'Range' of object '_Worksheet' failed. BTW This code is located in a Worksheet_Change event, if that has any bearing on this situation. Greetings, Peter |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy sheet and make new sheet active | Excel Discussion (Misc queries) | |||
Active Cell Copy And Paste Sheet to Sheet | New Users to Excel | |||
Using the Active cell in one sheet for another sheet | Excel Discussion (Misc queries) | |||
How to count rows in a user-defined AutoFilter or AdvancedFilter is active? | Excel Programming | |||
How to make a sheet the active sheet? | Excel Programming |