“Excel VBA运行时错误”424“所需的对象”不断popup

嗨,我是新来的VBA,我不断在我的电子表格上popup每隔一段时间这个错误消息。 我怎么知道这是什么原因?

以下是对我的代码的引用:

Private Sub Worksheet_Calculate() Dim OutApp As Object Dim OutMail As Object Dim Target As Double Dim bRun As Boolean Dim iHour As Integer 'On Error GoTo debugtest Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) Target = ThisWorkbook.Sheets("Quotes").Range("Q1") 'Reset the trigger flag if the last triggered time was yesterday or earlier If Day(Now()) <> Day(ThisWorkbook.Sheets("Quotes").Range("Q3")) Then 'Sheets("Quotes").Range("Q2") = False End If bRun = False iHour = Application.WorksheetFunction.Text(Time(), "[hh]") If iHour >= ThisWorkbook.Sheets("Quotes").Range("Q9") Or iHour <= ThisWorkbook.Sheets("Quotes").Range("Q10") Then bRun = True End If 

我该怎么办?