如果我想隐藏带有 u1=x 的标签,我该怎么做?我有这个,但它只是隐藏所有页面,而不仅仅是带有 u1=x 的页面
Sub Hide_Sheets_Containing()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
If Not (wks.Range("u1") = "X") Then
wks.Visible = xlSheetHidden
End If
Next
Set wks = Nothing
End Sub