1。用Activex Dll生成了个工程名为testDll,类名为Class1是工程,并编译成DLL文件。代码如下:
Option ExplicitPublic Sub jia(ByVal a As Long, ByVal b As Long)
    Dim s As Long
    s = a + b
End Sub2。另外新建了个工程(设为启动),在工程中引用了testDll.dll,form的代码如下:
Option ExplicitPrivate Sub Command1_Click()
Dim i As Long
Dim obj As testDll.Class1Set obj = New testDll.Class1
i = obj.jia(1, 3)
End Sub错误提示:缺少函数或变量