以下代码能成功引用
Private Sub Command1_Click()
On Error Resume Next
Dim REF As Reference
Dim strfilename As String
strfilename = "C:\WINDOWS\system32\stdole2.tlb" '路径由引用窗体获得
Set REF = Application.References.AddFromFile(strfilename) '必须加APPLICATION
MsgBox REF.Name & "已经被引用完毕" '获得应用名称的途径
End Sub
以下代码不能成功引用,为什么?怎样才能成功引用?
Private Sub Command1_Click()
On Error Resume Next
Dim REF As Reference
Dim strfilename As String
strfilename = "C:\Program Files\Microsoft Office\Office10\EXCEL.PIP" '路径由引用窗体获得
Set REF = Application.References.AddFromFile(strfilename) '必须加APPLICATION
MsgBox REF.Name & "已经被引用完毕" '获得应用名称的途径
End Sub
[此贴子已经被作者于2003-6-26 17:22:29编辑过]
|