|
本帖最后由 看见星光 于 2018-6-22 11:13 编辑
- Sub t()
- Dim i As Long, lngFrow As Long, lngLrow As Long
- Dim rng As Range, cll As Range
- Cells.EntireRow.Hidden = False
- lngFrow = 1
- For i = 1 To ActiveSheet.HPageBreaks.Count
- lngLrow = ActiveSheet.HPageBreaks(i).Location.Row - 1
- Set rng = Rows(lngFrow & ":" & lngLrow)
- If Application.CountIf(rng, ">""") = 0 Then
- If cll Is Nothing Then
- Set cll = rng
- Else
- Set cll = Union(cll, rng)
- End If
- End If
- lngFrow = lngLrow + 1
- Next
- If Not cll Is Nothing Then
- cll.EntireRow.Hidden = True
- End If
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|