跳转到sheet2里,此时隐藏的sheet2出现,sheet1隐藏。求高手指教!!
Sub abc()
Sheet2.Visible = xlSheetVisible
Sheet2.Activate
Sheet1.Visible = xlSheetHidden
End Sub
Sub abcd()
Sheet1.Visible = xlSheetVisible
Sheet1.Activate
Sheet2.Visible = xlSheetHidden
End Sub
Sub 激活隐藏()
Dim St As Worksheet
Dim Sht As Worksheet
Dim arr, i%
Set St = Sheets("目录")
arr = St.Range("B2:C6")
For i = 2 To UBound(arr)
Set Sht = Sheets(arr(i, 1))
If arr(i, 2) = "是" Then
Sht.Visible = xlSheetVisible
ElseIf arr(i, 2) = "否" Then
Sht.Visible = xlSheetHidden
End If
Next
End Sub