Promt When Closing
here is an example
Dim wSheet As Worksheet
'MsgBox Environ("Username")
Select Case Environ("Username")
Case "Name1" ' user name of exempt from protect
Case "name2" 'user name of exempt from protect
Case Else
MsgBox "n"
Select Case MsgBox("Do you want to Protect all Sheets
before Closing?", vbYesNo)
Case vbYes
For Each wSheet In Worksheets
wSheet.Protect ' this is protect
without password
Next wSheet
Case vbNo
End Select
End Select
End Sub
TheRook wrote:
This may be an easy one but I am very new to Macros.
I would like a promt/Window/box, whatever tou call it to come on screen when
closing the spreadsheet reminding me to ensure that the worksheet is
protected.
Is this possible?
If I can go onestep further I would like it to appear when only certain
people cloes the spreadsheet.
regards
|