- Buat Modul terlebih dahulu
Copy coding berikut
Public bIsClosing As Boolean
Dim wsSheet As Worksheet
Sub HideAll()
Application.ScreenUpdating = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName = "Sheet2" Then
wsSheet.Visible = xlSheetVisible
Else
wsSheet.Visible = xlSheetVeryHidden
End If
Next wsSheet
Application.ScreenUpdating = True
End Sub
Sub ShowAll()
bIsClosing = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName <> "Sheet2" Then
wsSheet.Visible = xlSheetVisible
End If
Next wsSheet
Sheet2.Visible = xlSheetVeryHidden
End Sub
Tidak ada komentar:
Posting Komentar