Private Sub Workbook_BeforeClose(Cancel As Boolean)
For Each Sh In Sheets
If Sh.Name <> "首页" Then
Sh.Visible = 2
End If
Next
End Sub
Sub UnHidden_Sheets()
On Error GoTo 100
Dim mm$
mm = InputBox("運行宏必需取得權限請!您輸入密碼:", "****")
If mm = "12345" Then
For Each Sh In Sheets
If Not Sh.Visible Then
Sh.Visible = -1
End If
Next
End If
100:
End Sub
Private Sub Workbook_Open()
Call UnHidden_Sheets
End Sub