DLL file name for the SAS Add-In reference in Excel VBA

时间:2019-03-19 15:08:47

标签: excel vba sas

What is the correct dll file name to load as reference in Excel VBA 2010, that correspond to SAS Add-in 7.1. I want to use VBA in the place to use the Tools menu.

I have tried :

ThisWorkbook.VBProject.References.AddFromFile "C:\Program Files (x86)\SAS\SASHome\x86\SASAddinforMicrosoftOffice\7.1\SAS.OfficeAddin.dll"

and

ThisWorkbook.VBProject.References.AddFromFile "C:\Program Files (x86)\SAS\SASHome\x86\SASAddinforMicrosoftOffice\7.1\office.dll"

They didn't work.

Thank you

1 个答案:

答案 0 :(得分:0)

用于SAS 7.1的Excel SAS外接程序的正确DLL文件是“ SAS.OfficeAddin.tlb”。

它位于文件夹“ C:\ Program Files(x86)\ SAS \​​ SASHome \ x86 \ SASAddinforMicrosoftOffice \ 7.1 \”中。

要使用VBA添加此参考,

ThisWorkbook.VBProject.References.AddFromFile "C:\Program Files (x86)\SAS\SASHome\x86\SASAddinforMicrosoftOffice\7.1\SAS.OfficeAddin.tlb"