- 帖子
- 31
- 主題
- 7
- 精華
- 0
- 積分
- 70
- 點名
- 0
- 作業系統
- Windows10
- 軟體版本
- Office365
- 閱讀權限
- 20
- 性別
- 男
- 來自
- Taiwan
- 註冊時間
- 2020-6-14
- 最後登錄
- 2024-8-19
 
|
[發問] 問題發問 run-time error 438
1個問題向各位前輩請教
我利用timeactiveV1定時間
去開啟Last 10 Batches這一個檔案
要做在sheet{"SIS")做計算 (用自動計算無法,只能用calculate功能)
程式編碼如下
Sub TimerX()
Dim dtToday, TD As String
dtToday = Date
TD = Right(dtToday, 2)
If TimerActive = True Then
Application.SendKeys "{UP}"
Application.OnTime Now() + TimeValue("00:08:05"), "Sheet1.TimerX", False: DoEvents
Workbooks.Open Filename:="C:\Users\Desktop\Last 10 Batches of R20.xlsm"
Application.Calculation = xlCalculationAutomatic
Workbooks("Last 10 Batches of R20.xlsm").Calculate
Workbooks("Last 10 Batches of R20.xlsm").Close SaveChanges:=True
Application.Calculation = xlCalculationManual
End If
End Sub
但是都會在 Workbooks("Last 10 Batches of R20.xlsm").Calculate 出現
Run-time error ‘438’:
Object doesn’t support this property or method
請教 要如何修改?
Safezipkit-CompressedFile (1).zip (59.33 KB)
|
|