KlausW
Active Member
- Joined
- Sep 9, 2020
- Messages
- 386
- Office Version
- 2016
- Platform
- Windows
Hi, I'm using this VBA code to hide and unhide sheets. But I would like it to be the sheets I wrote in the line With Sheets ("Master Data"), ie With Sheets ("Stamdata", "Tid", "Kostplan") or others. Someone who can help, all help will be appreciated. Best Regards Klaus W
VBA Code:
Sub Tilmelding_Rektangelafrundedehjørner1_Klik()
Dim a As String
With Sheets("Stamdata")
Do
.Visible = xlVeryHidden
a = InputBox("Indtast adgangskode for at åbne som Administrator", "Begrænset adgang")
If Len(a) = 0 Then Exit Sub
If a = "1234" Then
.Visible = xlSheetVisible
Exit Do
Else
MsgBox "Forkert adgangskode", 16, "Error"
End If
Loop
End With
End Sub