0
嘿,所以我在此代碼得到這個錯誤:運行時錯誤424所需的對象
Private Sub Request_Stuff_button_Click()
Call Main.createObjects
Call My_Control.requestStuff
End Sub
在「呼叫My_Control.requestStuff」線。 「主」模塊如下所示:
Public My_Control As ControlObject
Public Sub createObjects()
If My_Control Is Nothing Then
Set My_Control = New ControlObject
End If
End Sub
最奇怪的是,當我說讓我在錯誤的行前添加
Dim x As Integer
x = My_Control.dummyInt
,X前權得到正確的值這意味着My_Control肯定是一個對象,並且絕對不是什麼。
這個錯誤正在殺死我,在此先感謝。