|
模块代码:
- Public B As Boolean
- Sub AUTOREF()
- Dim shp As Shape
- Call SHOWALL
- If B Then
- For Each shp In ActiveSheet.Shapes
- If shp.Type <> 8 And shp.Type <> 12 Then
- If shp.Top < Range("A3").Top Then
- shp.Visible = msoFalse
- Else
- shp.Visible = msoCTrue
- End If
- End If
- Next
- Else
- For Each shp In ActiveSheet.Shapes
- If shp.Type <> 8 And shp.Type <> 12 Then
- If shp.Top < Range("A3").Top Then
- shp.Visible = msoCTrue
- Else
- shp.Visible = msoFalse
- End If
- End If
- Next
- End If
- INTLTIME = Now + TimeSerial(0, 0, 10) '设置间隔时间为10秒
- DoEvents
- B = Not B
- Application.OnTime INTLTIME, "AUTOREF"
- End Sub
- Sub STOPAUTO()
- End
- Application.OnTime INTLTIME, "AUTOREF", , False '关闭自动
- End Sub
- Sub SHOWALL()
- Dim shp As Shape
- For Each shp In ActiveSheet.Shapes
- shp.Visible = msoCTrue
- Next
- End
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|