SubHideRowsInAllSheets()
Dim ws As Worksheet
Dim i As Integer
' 循环遍历所有工作表
For Each ws In ThisWorkbook.Worksheets
' 循环遍历要隐藏的行
For i =10 To 26
ws.Rows(i).Hidden = False
Next i
Next ws
End Sub
打开
SubHideRowsInAllSheets()
Dim ws As Worksheet
Dim i As Integer
' 循环遍历所有工作表
For Each ws In ThisWorkbook.Worksheets
' 循环遍历要隐藏的行
For i =10 To 26
ws.Rows(i).Hidden = True
Next i
Next ws
End Sub
指定sheet
关闭
SubHideRows()
Dim ws As Worksheet
Dim i As Integer
' 指定要操作的工作表
Set ws = ThisWorkbook.Sheets("test") ' 在这里替换 "test" 为你的工作表名称
' 循环遍历要隐藏的行
For i =10 To 26
ws.Rows(i).Hidden = True
Next i
End Sub
打开
SubHideRows()
Dim ws As Worksheet
Dim i As Integer
' 指定要操作的工作表
Set ws = ThisWorkbook.Sheets("test") ' 在这里替换 "test" 为你的工作表名称
' 循环遍历要隐藏的行
For i =10 To 26
ws.Rows(i).Hidden = False
Next i
End Sub