I have a sheet I have being hidden upon closing the file. That works fine.. here's the code for that:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Open Items").Visible = True
Sheets("Open Items").Select
Range("A1").Select
Sheets("Open Items").Select
ActiveWindow.SelectedSheets.Visible = False
Range("D11").Select
End Sub
I had to, in order for it to work properly (at least with my limited skills), unhide the sheet first, then hide it...
But, here is the problem. When more than one workbook is open and the user closes Excel entirely, rather than closes just the file in which they are working a "Run Time Error 1004 Select method of Worksheet Class Failed" appears...
When hitting the debug the "Sheets("Open Items").Select" line is highlighted...
What to do...What to do...