Same answer as last time.
If security is high, no unsigned code will run so you can't pop up the
message box using code.
If security is Medium, the message box will pop up allowing user to enable
or disable.
If disabled, the workbook still opens but macros won't run.
Generally you have a contingency plan that renders the workbook useless if
users open with macros disabled.
Here is a sample................
Create a sheet named Dummy with a large message typed in the middle.
"You have disabled Macros and this workbook is useless without them. Please
close and re-open with macros enabled"
Then add these two event codes to Thisworkbook module.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim sht As Worksheet
Application.ScreenUpdating = False
Sheets("Dummy").Visible = xlSheetVisible
For Each sht In ActiveWorkbook.Sheets
If sht.Name <> "Dummy" Then
sht.Visible = xlSheetVeryHidden
End If
Next sht
Application.ScreenUpdating = True
ThisWorkbook.Save
End Sub
Private Sub Workbook_Open()
Dim sht As Worksheet
Application.ScreenUpdating = False
For Each sht In ActiveWorkbook.Sheets
If sht.Name <> "Dummy" Then
sht.Visible = True
Sheets("Dummy").Visible = xlSheetVeryHidden
End If
Next sht
Application.ScreenUpdating = True
End Sub
Gord Dibben MS Excel MVP