I hope someone has an idea. I must be missing something obvious.
When the user saves a workbook I want excel to do the following:
1. Unhide sheet1
2. Hide Sheet2
3. Save the file
4. Unhide sheet2
5. Hide sheet1
Up to step 3 is not a problem, but steps 4 and 5 is a problem as I am using the following event:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
and I cannot unhide the sheets after the save.
When the user saves a workbook I want excel to do the following:
1. Unhide sheet1
2. Hide Sheet2
3. Save the file
4. Unhide sheet2
5. Hide sheet1
Up to step 3 is not a problem, but steps 4 and 5 is a problem as I am using the following event:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
and I cannot unhide the sheets after the save.