CEL = Sheet1.Range("IV5").End(xlToLeft).Address(0, 0)
With Sheet1.Range("H5:" & CEL)
Set RNG = .Find(CDate(Me.CmbStart), LookIn:=xlFormulas).Offset(0, -1)
Set RNG2 = .Find(CDate(Me.Cmbend), LookIn:=xlFormulas).Offset(0, 1)
End With
If Not RNG Is Nothing And Not RNG2 Is Nothing Then
R = RNG.Address(0, 0)
R2 = RNG2.Address(0, 0)
Columns("H:" & Left(R, Len(R) - 1)).Hidden = True
Columns(Left(R2, Len(R2) - 1) & ":BJ").Hidden = True
End If
End Sub作者: ppsnow 时间: 2006-8-28 21:02
还有当我选择一个时间段,按了”show“只后,再改选”to“的日期, 就又报错了,不知道怎么修改程序,最后目的是无论怎么该都可以正常显示,而不用按”back“再选择。