access password

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Developing a small program containing 125 sheets with buttons directing you
to the sheets. now there are several sheets that i only want certain users to
access, is there VB code which when you click on say page 120 a window pops
up asking for a 4 diget code and will redirect you to the main page if the
code is entered incorrectly???
 
Something like...
Dim strAnswer As String, MyPassword As String

MyPassword = "Test"

strAnswer = InputBox("Enter Password: ", _
"Password Protected Worksheet...")

'make everthing uppercase for comparison
If UCase(strAnswer) <> UCase(MyPassword) Then
Application.Sheets("Page_1").Activate
End If
 

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

Back
Top