嘿,所以我在这段代码中得到了这个错误:
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 绝对是一个对象,绝对不是什么。
这个错误正在杀死我,在此先感谢。