Hi All
I have recently been looking at this forum (following a successfully answered query earlier in the year) and found some basic answers to a query i am now trying to answer. I am looking to keep a 24 tab/sheet workbook and have a userform, if possible, to offer an option for entering a password, the password would then open a set number of tabs for that authorised person to work on. When the workbook is closed the information changed is automaticly saved and all open tabs hided again ready for the next person to enter their password when the work book is opened again.
I will need to have 4 password options...using some info found on this forum ive worked out the following code, which doesnt seem to work (the userform and save/close/hide part hasnt been started yet)
Also, even though is doesnt work the file takes ages to open... is it clear what i am doing wrong?
Thanks in advance.
Tarl
Sub PwdCheck()
Dim Pwd As String
Select Case LCase(Application.InputBox("Please enter your password", "test", Type:=2))
Case "Summary"
Sheets("S1").Visible = xlSheetVisible
Case "Chairman"
Sheets("CT1").Visible = xlSheetVisible
Case "Special"
Sheets("MWS").Visible = xlSheetVisible
Sheets("DLMW").Visible = xlSheetVisible
Sheets("MWSP").Visible = xlSheetVisible
Sheets("MWRT").Visible = xlSheetVisible
Sheets("SWS").Visible = xlSheetVisible
Sheets("DLSW").Visible = xlSheetVisible
Sheets("SWSP").Visible = xlSheetVisible
Sheets("MWRTa").Visible = xlSheetVisible
Case "Accounts"
Sheets("MC").Visible = xlSheetVisible
Sheets("ROLR").Visible = xlSheetVisible
Sheets("R").Visible = xlSheetVisible
Sheets("SP").Visible = xlSheetVisible
Sheets("VAT").Visible = xlSheetVisible
Sheets("Rents").Visible = xlSheetVisible
Sheets("Rates").Visible = xlSheetVisible
Sheets("OO").Visible = xlSheetVisible
Sheets("VL").Visible = xlSheetVisible
Sheets("PS").Visible = xlSheetVisible
Sheets("EEBS").Visible = xlSheetVisible
Sheets("CIS-PAYE tax").Visible = xlSheetVisible
Sheets("Misc").Visible = xlSheetVisible
End Select
End Sub
Bookmarks