我是这样做的
第一步
ActiveX dll 中,我建立了一个frm(比如说叫frmTT)和两个cls,有一个cls(比如说叫abcde)是这样写得
Public Sub Test()
Dim fForm As New frmTT 'frmTT是已经建立的form
fForm.Show
End Sub
另一个cls(名称为open)是frm里相关代码的公用函数.
-----------------------------然后这个ActiveX dll工程起名为:firsttest,生成firsttest.dll
第二步:
建立一个新exe 工程,引用了firsttest.dll.在form1中添加一个按钮并在form1 添写如下代码:
Private Sub Command1_Click()
dim a as new abcde
call a.test
End Sub