- ©«¤l
- 116
- ¥DÃD
- 29
- ºëµØ
- 0
- ¿n¤À
- 232
- ÂI¦W
- 0
- §@·~¨t²Î
- winXp
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- ¨Ó¦Û
- ¥xÆW¥x¤¤¥«
- µù¥U®É¶¡
- 2010-9-6
- ³Ì«áµn¿ý
- 2023-7-11
|
§Ú±Nµ{¦¡×§ï¦¨¦p¤U¡Aµ²ªGµ{¦¡Åܦ¨¤£¯à¶]¤F¡A¦Ó¥B¦b¥¼×§ï«e¥i¥H¶]¨âÓµ{¦¡¡A¦ý¶}±Ò¨ä¥LEXCELÀÉ«áµ{¦¡·|Åܦ¨¶]¨ì¥t¤@Ó·sEXCEL°µ¹Bºâ(ex,¶]¨ìbook2.xls¤¤°µp¼Æ)
Option Explicit
Declare Function SetTimer _
Lib "user32" ( _
ByVal hWnd As Long, _
ByVal nIDEvent As Long, _
ByVal uElapse As Long, _
ByVal lpTimerFunc As Long) _
As Long
Declare Function KillTimer _
Lib "user32" ( _
ByVal hWnd As Long, _
ByVal nIDEvent As Long) _
As Long
'EXCELµøµ¡ªºhandle, id³]¬°1, ¨C 0.2¬í°õ¦æ1¦¸Asubµ{§Ç
Sub StartAsub()
SetTimer Application.hWnd, 1, 200, AddressOf Asub
End Sub
Sub StopAsub()
KillTimer Application.hWnd, 1
End Sub
Sub StartBsub()
SetTimer Application.hWnd, 2, 500, AddressOf Bsub
End Sub
Sub StopBsub()
KillTimer Application.hWnd, 2
End Sub
Sub Asub()
With ActiveSheet.Workbooks("book1.xls").Sheets("sheet1").Range("a1")
.Value = .Value + 1
End With
End Sub
Sub Bsub()
With ActiveSheet.Workbooks("book1.xls").Sheets("sheet1").Range("b1")
.Value = .Value + 1
End With
End Sub |
|