|
发表于 2013-3-20 15:51
|
显示全部楼层
本楼为最佳答案
- Sub 隐藏()
- Dim Rng As Range
- Dim a As Date
- Dim b As Date
- Dim c As Date
- Dim d As Date
- Dim e As Date
- Dim f As Date
- Dim g As Date
- Dim h As Date
- Dim i As Date
- Dim j As Date
- Dim k As Date
- Dim l As Date, m As Integer, n As Integer, o As Integer, p As Integer, q As Integer
- Dim sht As Worksheet
- a = "2013-1-10 00:00"
- b = "2013-2-10 00:00"
- c = "2013-3-10 00:00"
- d = "2013-4-10 00:00"
- e = "2013-5-10 00:00"
- f = "2013-6-10 00:00"
- g = "2013-7-10 00:00"
- h = "2013-8-10 00:00"
- i = "2013-9-10 00:00"
- j = "2013-10-10 00:00"
- k = "2013-11-10 00:00"
- l = "2013-12-10 00:00"
- m = Year(dd)
- n = Month(dd)
- o = Day(dd)
- p = Hour(dd)
- q = Minute(dd)
- For Each sht In Worksheets
- With sht
- For Each Rng In .Range("a:a")
- If Rng = a Or Rng = b Or Rng = c Or Rng = d Or Rng = e Or Rng = f Or Rng = g Or Rng = h Or Rng = i Or Rng = j Or Rng = k Or Rng = l Then
- .Rows(Rng.Row).EntireRow.Hidden = True
- End If
- Next
- End With
- Next
- End Sub
复制代码 |
|