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

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 1214 Downloads 508

'Macro', 'enable macros', 'security', 'welcome sheet', 'welcomesheet'

ANmarAmdeen
448
Attachments
Protection VBA-Excel
Revisions

v2.0