G
gthing66
Hi all,
I have a multiple worksheets which i wish to password protect. I have
done so using the following VBA code:
Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Protect Password:="XXXX"
Next n
Application.ScreenUpdating = True
End Sub
Sub UnprotectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Unprotect Password:="XXXX"
Next n
Application.ScreenUpdating = True
End Sub
I do not wish others to be able to view this code as it defeats the
purpose of password protecting it.
How do i hide this macro but still be able to run it at my own
expense?
Cheers,
Grant.
I have a multiple worksheets which i wish to password protect. I have
done so using the following VBA code:
Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Protect Password:="XXXX"
Next n
Application.ScreenUpdating = True
End Sub
Sub UnprotectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Unprotect Password:="XXXX"
Next n
Application.ScreenUpdating = True
End Sub
I do not wish others to be able to view this code as it defeats the
purpose of password protecting it.
How do i hide this macro but still be able to run it at my own
expense?
Cheers,
Grant.