|
这是一个打开表就自动运行的时间VBA,且表不闪动,但为什么不能在表中输入,一旦在表中输入表就自动关了(就是说你在表上多点几下,表就自动关了),怎么才能能让表可以任意输入呢?
Public Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Public Declare Function KillTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long) As Long
Public iTimerID As Long
Public Sub OnTimer()
Worksheets("Sheet1").Range("T1").Value = Time
End Sub
Sub Auto_Open()
iTimerID = SetTimer(0, 0, 1000, AddressOf OnTimer)
End Sub
具体可见附件: |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|