vb调用matlab生成的com组件出现自动化错误
我在用vb调用matlab生成的com组件,运行到set语句时总是出现自动化错误,是怎么回事啊?请各位高手帮帮忙吧Public fa As zxec.f
Public x As Variant
Public y As Variant
Public ga As zxwjy.g
Private Sub Command1_Click()
Image1.Picture = Clipboard.GetData()
Dim f As Variant
Set fa = New zxec.f
Call fa.f(1, f, x, y)
Label1.Caption = "Ô²¶ÈÎó²îΪ£º" & Round(f, 5)
End Sub
Private Sub Command2_Click()
Image1.Picture = Clipboard.GetData()
Dim g As Variant
Set ga = New zxwjy.g
Call ga.g(1, g, x, y)
Label1.Caption = "Ô²¶ÈÎó²îΪ£º" & Round(g, 5)
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
On Error GoTo handle_error
Exit Sub
handle_error:
MsgBox (Err.Description)
End Sub