Hi all,
I have a WorkBook consisting of 9 Worksheets. The administrator is the main user of the WorkBook and has access to all the sheets.
All sheets are accessed by command buttons on sheet1, by either hyperlinks or by, in this case, an assigned macro.
On sheets 3, 5 and 7 however, between rows 82 to 203, there is sensitive employee pay rate data, for which I only want the Manager to have access to.
When the administrator opens say, sheet 3 (5 and 7 are similar but different departments) a macro runs to hide the sensitive rows then protects the sheet with the password (apricot). The macro to do this works fine. So far so good.
My problem is, when accessing the sensitive data. By using the code below it all works perfectly fine as long as the correct password is entered.
If a wrong password is entered, or cancel is pressed then 'run time error 1004' box appears.
How can I either go back to Sheet1 when 'cancel' is pressed, or continue to ask for a password if the wrong one is entered?
It is probably quite simple but for the life of me i cannot work it out.
Any help gratefully received
Andrew
Please Login or Register to view this content.
Bookmarks