Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook BeforeClose Event Error
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Current Issues Log").Select Selection.AutoFilter Field:=4, Criteria1:="<Closed", Operator:=xlAnd End Sub I am using the above to autofilter my sheet before close. I am using this identical code in two workbooks, which have the same worksheet names. It works fine when I close one workbook at a time, but if I try to shut down excel with both books open, I get a runtime error '1004' select method of worksheet class failed. Is there a way round this? Regards Dylan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
BeforeClose event help | Excel Programming | |||
BeforeClose Event | Excel Programming | |||
Is workbook beforeclose event the best place to do this? | Excel Programming | |||
How to get out of BeforeClose event without closing? | Excel Programming | |||
BeforeClose event - Savings | Excel Programming |