I built a excel macro using the "Microsoft Outlook 15.0 Object Library" reference, but when I send the file to other people they get this error: "Can’t find project or library".
This file will be used by a lot of people, so I have to add it from VBA Code.
I'm using this code that runs when you open the excel file, which is returning the following error: "Error in loading DLL"
Private Sub Workbook_Open()
Application.VBE.ActiveVBProject.References.AddFromFile "C:\Program Files (x86)\Microsoft Office\Office15\MSOUTL.OLB\"
End Sub
Do you have any idea why this is happening?
Thanks
mscomct2.ocx
with the excel file? If yes then you will have to get an elevated registration of mscomct2.ocx. This ocx is not native to VBA environment. It is a VB6 control and should be avoided in such a case. – Siddharth Routmscomct2.ocx
? – Siddharth Rout