WelcomeSheet

A User-Friendly way to ask user to enable macros. Showing an only sheet to let user click on "Enable Macros" to let your macros work.
The transition happen with no flickering, no refreshing, smooooooth.
Paste below code in "ThisWorkbook" object in your Excel Macro-Enabled workbook, then copy Attached sheet.
This has been developed across the years since 1999


Public

Tested

My Own Work
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
WasSaved = ThisWorkbook.Saved
For I = 1 To Worksheets.Count
If Worksheets(I).Name = "WelcomeSheet" Then
Worksheets("WelcomeSheet").Visible = xlSheetVisible
Else
Worksheets(I).Visible = xlSheetHidden
End If
Next I
Worksheets("WelcomeSheet").Range("A1").Select
If WasSaved Then ThisWorkbook.Save
Application.ScreenUpdating = True
End Sub
Private Sub Workbook_Open()
Application.ScreenUpdating = False
For I = Worksheets.Count To 1 Step -1
If Worksheets(I).Name = "WelcomeSheet" Then
Worksheets(I).Visible = xlSheetHidden
Else
Worksheets(I).Visible = xlSheetVisible
End If
Next I
Exit_Now:
' You can call any startup sub here ' Startup
ByeBye:
Application.ScreenUpdating = True
End Sub

Views 4217 Downloads 1474

VBA-Excel Protection
ANmarAmdeen
813
Attachments
Revisions

v2.0