Security
The macro will hid the sheet if it's visible or unhide it if it isn't and my
advice remains the same about security. To auto hide the sheet paste this bit
of the code into the workbook before_close event
If Worksheets("revenue").Visible = True Then '<Change worksheet name as req'd
Worksheets("revenue").Visible = xlVeryHidden
Else
Worksheets("revenue").Visible = True
End If
Mike
"The Rook" wrote:
Thanks for that.
Is it possible to auto hide the Revenue sheet when the file is closed?
regards
"Mike H" wrote:
The first thing to say is that if the information on the hidden page is
sensitive then don't do it. Excel security is like tissue paper and anyone
with a basic knowledge will unhide the sheet very quickly indeed. That said
if you want to proceed then use xlveryhidden as in this macro:-
Sub hideme()
msg = "Enter password"
response = InputBox(msg, vbCritical)
If response < "xxx" Then End '<Change as required
If Worksheets("revenue").Visible = True Then '<Change worksheet name as req'd
Worksheets("revenue").Visible = xlVeryHidden
Else
Worksheets("revenue").Visible = True
End If
End Sub
Mike
"The Rook" wrote:
I have an excel workbook that contain serveral worksheets. I am wanting to
set up security so that certain people can only veiw certain worksheets and
not others.
ie I have an Order book revenue sheet that I only want the MD & FD to view
but would like everyone ealse to view everything but this sheet.
Is it possible?
regards
|