Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Password/Multiple Sheets

I would like a macro that when pushed it will display a
message "please insert password" if the password entered
is correct then it will goto sheet2 if the password is
incorrect it will display a message "Incorrect Password"
and go to sheet1

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Password/Multiple Sheets

Glenn,

Copy/Paste this code into a regular module:

Sub Pwd()
Dim passwd As String
passwd = InputBox("Please enter password: ", "Password Input")
If passwd = "xyz" Then
Sheets(2).Visible = True
Sheets(2).Activate
Else
MsgBox "Wrong Password"
Sheets(1).Activate
End If
End Sub

And then create a button from the "Forms" toolbar and when
prompted, assign it to this macro.

John

"Glenn" wrote in message
...
I would like a macro that when pushed it will display a
message "please insert password" if the password entered
is correct then it will goto sheet2 if the password is
incorrect it will display a message "Incorrect Password"
and go to sheet1

thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro password-All sheets visible puiuluipui Excel Discussion (Misc queries) 4 September 15th 09 05:47 PM
Password Protected Sheets bmorgan8h Excel Discussion (Misc queries) 0 February 27th 09 09:53 PM
Password Access to certain sheets Sheryl Excel Worksheet Functions 2 November 28th 06 09:39 PM
password protect sheets rufusf Excel Worksheet Functions 2 March 7th 06 09:00 AM
Protecting Multiple sheets with prompt for password to unprotect pkley Excel Programming 1 January 10th 04 06:46 AM


All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"