![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 133
|
I have a worksheet with a photo on it with a macro attached that unhides a worksheet with that particular persons details on it. What code would I need to add to the macro that unhides the worksheet but before that would prompt the user for a login/password otherwise if they do not know the login/password leave the user on the worksheet with the photo on it?
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
How about something simple, like the following code:
password = InputBox("Enter Password") If password = "YourPassword" Then Worksheets("Sheet1").Visible = True Substitute your password for YourPassword and your sheet for Sheet1.
__________________
Kind regards, Al Chara |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 133
|
Many thanks Al it works well.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|