V
Vacuum Sealed
Hi everyone
This code works on one sheet, but I realise that I actually need it to
look at each sheet in my workbook.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim mySht As Worksheet
Dim myRow As Range
Set mySht = Sheets("Sheet1")
Set myRow = mySht.Rows("1:1")
If myRow.AutoFilter = True Then
myRow.AutoFilter
myRow.AutoFilter
ActiveWorkbook.Save
End If
End Sub
I played around with ( For each sheet ) but could not get the structure
correct.
My sheet array is "Jan" through to "Dec"
Also, I have a Timer control that is triggered after 5 mins of user
sheet inactivity which I would like this to be triggered just prior to
the workbook saving and closing...
As always
Heaps of thanks in advance..
Mick.
This code works on one sheet, but I realise that I actually need it to
look at each sheet in my workbook.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim mySht As Worksheet
Dim myRow As Range
Set mySht = Sheets("Sheet1")
Set myRow = mySht.Rows("1:1")
If myRow.AutoFilter = True Then
myRow.AutoFilter
myRow.AutoFilter
ActiveWorkbook.Save
End If
End Sub
I played around with ( For each sheet ) but could not get the structure
correct.
My sheet array is "Jan" through to "Dec"
Also, I have a Timer control that is triggered after 5 mins of user
sheet inactivity which I would like this to be triggered just prior to
the workbook saving and closing...
As always
Heaps of thanks in advance..
Mick.