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

[µo°Ý] ¹H¤Ï¦@¥Î­ì«h

[µo°Ý] ¹H¤Ï¦@¥Î­ì«h

½Ð°Ý½×¾Âªº¤j¤j­Ì
"¹H¤Ï¦@¥Î­ì«h"¬O¬Æ»ò·N«ä


¥[¤J©³¤Uªº»yªk´N·|¥X²{"¹H¤Ï¦@¥Î­ì«h"
Private Sub Workbook_Open()
Application.OnTime TimeValue("17:00:00"), "full_calc"
End Sub

»yªkªº¨Ó·½
https://learn.microsoft.com/zh-tw/office/vba/api/excel.application.ontime

«D±`·PÁÂsingo1232001¤j¤jªº¸Ñ´b
«D±`·PÁÂgoner¤j¤jªº¸Ñ´b

±N»yªk§ï¦¨³o¼Ë´N¨S¦³¥X²{"¹H¤Ï¦@¥Î­ì«h"ªº¿ù»~°T®§¤F
Function IsFileOpen(filePath As String) As Boolean
    Dim fso As Object
    Dim file As Object
   
    Set fso = CreateObject("Scripting.FileSystemObject")
    On Error Resume Next
    Set file = fso.OpenTextFile(filePath, 1)
    If Err.Number = 0 Then
        IsFileOpen = False
        file.Close
    Else
        IsFileOpen = True
    End If
    On Error GoTo 0
    Set file = Nothing
    Set fso = Nothing
End Function
======================================
Private Sub Workbook_Open()
Application.OnTime TimeValue("17:00:00"), "full_calc"
End Sub

TOP

¦^´_ 8# goner

«D±`·PÁÂgoner¤j¤jªº¸Ñ´b

§Ú¬O¥t¦s¤@­ÓÀÉ®×°µ­×§ï
¤]«Ü½T©wÀɮרèS¦³¶}°_¦@¥Î

TOP

¦^´_ 7# singo1232001


«D±`·PÁÂsingo1232001¤j¤jªº¸Ñ´b
¤U­±ªº¼gªk¨Ã¨S¦³¥X²{"¹H¤Ï¦@¥Î­ì«h"
Sub ±M®×_«ö¶s22_Click()
Call full_calc
End Sub

TOP

¦^´_ 1# cowww


    ¥i¯à¬O¸ê®Æ§¨¦@¥Î¡BÀɮצ@¥ÎÅv­­°ÝÃD¡A
¥i¥H¸Õ¸Õ½Æ»s¤@­ÓÀɮרì¥t³B¡A¸ê®Æ§¨¡BÀɮ׬Ҥ£¯à¬O¦@¥Î¡C

TOP

¦^´_ 6# cowww


·Pı¤W ontime³o¥y»yªk¨S°ÝÃD

¦Ó¬O¦b³o full_calc ­Óµ{§Ç¸Ì­±¥X¿ù

¦bfull_calc¥X¿ù ³Q¼u¥X¨Ó ontime³oÃä ·|»~»{¥H¬°¬Oontime¥X¿ù  

À³¸Ó¥ý¥t¥~¼g¤@­Óª½±µ´ú¸Õ¤£­n¥Îontimeªº¤è¦¡ call full_calc ³v¦æF8¬Ý¬Ý

sub testcall
call full_calc
end sub

TOP

¦^´_ 5# singo1232001

§Ú¤]¬Oı±o¼g¦bopen©³¤U¤ñ¸û¦n
¦ý¬O§Ú¦b¤½¥q¹q¸£ªºÅv­­¥u¦³¨Ï¥ÎªÌ
¨S¿ìªk°µWindows¤u§@±Æµ{¾¹

©Ò¥H¤~·|·Q¨ì¥Îontime

TOP

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2023-8-11 14:08 ½s¿è

¦^´_ 4# cowww


¦]¬°¨S¦³¬Ý¨ìfull_calcªº¼Ò²Õ  ©Ò¥HµLªk§PÂ_

¦ý§Ú¤£«Øij §âontime ¼g¦bThisworkbook¼Ò²Õ¤º
À³§ï¼g¦b¦Û­q¼Ò²Õ¤U
¦Ó¦bopenªº®É­Ô ¥hcall©I¥s³o­Ó¼Ò²Õ

TOP

¦^´_ 3# singo1232001

«D±`·PÁÂsingo1232001¤j¤jªº¸Ñ´b

ÁÙ¬O·|¥X²{"¹H¤Ï¦@¥Î­ì«h"ªº¿ù»~°T®§

TOP

¦^´_ 2# cowww


    ­Y§Ú¨S°O¿ù ³o¸Ì¥i¯à¦³¨â­Ó¿ù»~
1.®É¶¡µ¥«Ý §Ú«Øij¬O Application.OnTime date+TimeValue("17:00:00"), "full_calc"


2.¥Ñ©ó³o¸Ìªº®Ñ¼g¤è¦¡»Pcall ªº¤è¦¡¤£¦P  ¤ñ¸ûÃþ¦üvb
¨Ò¦p»¡ ¬Y­Ó¼Ò²Õ moduel1 ·í¤¤ªº sub test() µ{§Ç
¨º´N¸Ó¼g¦¨
Application.OnTime date+TimeValue("17:00:00"), "moduel1.test"
¦Ó¤£¯à¼g¦¨
Application.OnTime date+TimeValue("17:00:00"), "test"

TOP

        ÀR«ä¦Û¦b : ºÉ¦h¤Ö¥»¥÷¡A´N±o¦h¤Ö¥»¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD