Ladies & Gents,
I am utilizing the following code to force the user of my database to enable macros. This is the code:
Public bIsClosing As Boolean
Dim wsSheet As Worksheet
Sub HideAll()
Application.ScreenUpdating = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName = "Alert" Then
wsSheet.Visible = xlSheetVisible
Else
wsSheet.Visible = xlSheetVeryHidden
End If
Next wsSheet
Application.ScreenUpdating = True
End Sub
Sub ShowAll()
bIsClosing = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName <> "Alert" Then
wsSheet.Visible = xlSheetVisible
End If
Next wsSheet
Sheet1.Visible = xlSheetVeryHidden
ActiveWorkbook.Sheets("Directory").Activate
End Sub
It seems like I should just be able to add
ActiveWorkbook.Sheets("Directory").Activate
to the end of ShowALL - but It does not seem to be working...
Any and all help would be greatly appreciated.
Bookmarks