ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó»s§@¶}Ãö¥Î³~ªº«ö¶s¡H

[µo°Ý] ¦p¦ó»s§@¶}Ãö¥Î³~ªº«ö¶s¡H

µ{¦¡½X¦p¤U
Private Sub start_Click()
    Dim switch As Boolean
    switch = IIf(switch, False, True)
    Sheet7.Cells(1, "E") = IIf(switch, "ON", "OFF")
    getdata switch
End Sub
½Ð°Ý³o¼Ë¼g¦³¨º¸Ì¿ù»~¶Ü¡H°õ¦æ«á¥X²{°T®§¡A¡u¤Þ¼Æ¤£¬°¿ï¾Ü©Ê(optional)¡v

¥t¥~½Ð°Ý
¨Ï¥Îapplication.ontime now+timevalue("00:01"), "getdata"
¦³¤°»ò¤èªk¥i¥H±N«e¤@¦¸³]©wªºschedule¨ú®ø¡H
¦]¬°§Ú¦bgetdata¥»¨­·í¤¤¦³¦A¿é¤J¤W­±¨º¬qcode
³o¼Ë¥¦·|¦b¶}©l°õ¦æ«á¨C¹j¤@¤ÀÄÁ´N¦A°õ¦æ¤@¦¸¡A
¦ý¬O¤@¥¹ÂIÀ»«ö¶s¼Æ¦¸«á¡A¥¦´N·|³sÄò°õ¦æ¤F
¤£¶i«h°h

¤w´ú¸Õ¦¨¥\¡A·PÁª©¥D¸Ñµª
¤£¶i«h°h

TOP

¦^´_ 5# mnsmrtl
  1. Private Sub start_Click()
  2.     Dim switch As Boolean
  3.     switch = IIf(switch, False, True)
  4.     Sheet7.Cells(1, "E") = IIf(switch, "ON", "OFF")
  5.     If switch=True then
  6.        Application.OnTime Now + TimeValue("00:00:01"), "'GetData  " & switch & "'"
  7.     End If
  8. End Sub
½Æ»s¥N½X

TOP

§Ú¬O·Q¦bswitch¤Á´«¦^false®É°±¤î
§Ú¦b²Ä¤@¬qªº©I¥sgetdata¡A¤]¬O§Æ±æ³z¹L«ö¶sIJµo
«ö¶sÂIÀ»¡÷switch=true¡÷¶}©l©w®É°õ¦ægetdata¡F¦AÂIÀ»¡÷switch=false¡÷getdata¤¤¤î
³o¬O§Ú·Q§@¥Xªº®ÄªG¡AÁٽШâ¦ìª©¥D¤£§[«ü±Ð¡A·PÁÂ
¤£¶i«h°h

TOP

¦^´_ 3# mnsmrtl
¡u¤Þ¼Æ¤£¬°¿ï¾Ü©Ê(optional)¡v ªº¿ù»~ §A¦n¹³¬O«ü¦] getdata switch ³oµ{¦¡½X©Ò¤Þ°_ªº
¦ý¤Þ°_³o¿ù»~À³¸Ó¬O Application.OnTime Now + TimeValue("00:00:01"), "getdata"
½Ð­×§ï¦¨¦p¤U
Application.OnTime Now + TimeValue("00:00:01"), "'GetData  " & switch & "'"
¦³¤°»ò¤èªk¥i¥H±N«e¤@¦¸³]©wªºschedule¨ú®ø¡H
¦]¬°§Ú¦bgetdata¥»¨­·í¤¤¦³¦A¿é¤J¤W­±¨º¬qcode

oobird ª©¥D ¤£¬O»¡ [¬Ý¬Ýgetdataªº°Ñ¼Æ³]¬°¤°»ò¡H]
·N«ä¬O§A¨ú®øªº±ø¥ó¬O¤°»ò?

TOP

¦^´_ 2# oobird


    °Ñ¼Æ´N¬Oswitch¡A¬OT/F«¬ºAªºÅܼÆ
¤£¶i«h°h

TOP

¬Ý¬Ýgetdataªº°Ñ¼Æ³]¬°¤°»ò¡H

TOP

        ÀR«ä¦Û¦b : ¯¸¦b¥b¸ô¡A¤ñ¨«¨ì¥Ø¼Ð§ó¨¯­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD