referencing a cell in a hidden sheet

G

Guest

Hello,
I use the code below to enable an authorized user to view a particular sheet.

Question:
Rather than having the password directly in the code, i want to refer to it
in another hidden sheet called 'ColumnMap'. How can I do this? What i am
trying (see below) isn't working


If InputBox("The 'Actual vs Budget' report has restricted access.
Please enter a password to continue") <> Sheets("Actual vs
Budget").Range("Q3").Value Then
MsgBox "Incorrect Password"
Else
Worksheets("Actual vs Budget").Visible = True
Worksheets("Actual vs Budget").Activate
Unload Me
End If
 
O

Otto Moehrbach

Carlee
Please post back with more detail of what you have and what you want.
Is it that you have a number of passwords in the ColumnMap sheet, along with
a number of sheet names, one per password, and you want to unhide and
display the specific sheet that goes with the specific password? The code
that you have doesn't include the text "ColumnMap" and you say that's where
the password(s) are. Post back and you will get lots of help. HTH Otto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top