Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a document with three sheets. One of them is hidden (standard situation). I would like to create a button in one of the other sheets to automatically change the property of the hidden sheet to visible when I push the button. But the change to visible should be confirmed by a password which is preset. If an incorrect password is entered the property of the sheet remainds hidden. How can I achieve this? Thanx in advance. Noepie |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub unhide_sht1()
pword = InputBox("Enter the password") If pword = "qwert" Then Sheets("Sheet1").Visible = True Else MsgBox "Incorrect Password" End If End Sub Note: Sheet1 should be set to xlveryhidden or users can unhide simply by FormatSheetUnhide Lock the code from view by setting ProjectProperties to locked. Gord Dibben MS Excel MVP On Wed, 24 Dec 2008 09:41:01 -0800, Noepie wrote: Hello, I have a document with three sheets. One of them is hidden (standard situation). I would like to create a button in one of the other sheets to automatically change the property of the hidden sheet to visible when I push the button. But the change to visible should be confirmed by a password which is preset. If an incorrect password is entered the property of the sheet remainds hidden. How can I achieve this? Thanx in advance. Noepie |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Noepie;158755 Wrote: Hello, I have a document with three sheets. One of them is hidden (standard situation). I would like to create a button in one of the other sheets to automatically change the property of the hidden sheet to visible when I push the button. But the change to visible should be confirmed by a password which is preset. If an incorrect password is entered the property of the sheet remainds hidden. How can I achieve this? Thanx in advance. Noepie You could also hide the sheet if it is visible in the same macro. Sub unhide_sht1() If Sheets("Sheet1").Visible = xlSheetVisible Then Sheets("Sheet1").Visible = xlSheetVeryHidden Else pword = InputBox("Enter the password") If pword = "qwert" Then Sheets("Sheet1").Visible = xlSheetVisible Else MsgBox "Incorrect Password" End If End If End Sub -- mikeaj72 ------------------------------------------------------------------------ mikeaj72's Profile: http://www.thecodecage.com/forumz/member.php?userid=46 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=44054 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I unprotect a spreadsheet? | Excel Worksheet Functions | |||
unprotect workbook | Excel Discussion (Misc queries) | |||
Unprotect | Excel Discussion (Misc queries) | |||
Unprotect via prompt | Excel Programming | |||
Unprotect via prompt | Excel Programming |