Code Help

  • Thread starter Thread starter Markus
  • Start date Start date
M

Markus

How can I write a VB code to a command button that will
bring up a password prompt and only open another sheet if
the user enters the correct password?
Thanks
 
Will this work?

Sub askpassword()
ans = InputBox("Enter Password")
If UCase(ans) <> "JOE" Then Exit Sub
Sheets("Joe").Select
End Sub
 

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