Hi guys
Created a link via a button from an in-house application to excel which works fine. But for it to work excel must be referenced from within the application otherwise it fails.
Doing this manually is OK just select the project. But we have numerous PCs to test on so wanted to do this programmatically. Thus, code i thought would work is -
Application.VBE.ActiveVBProject.References.AddFromFile _
"C:\Program Files\Microsoft Office\Office\EXCEL8.OLB"
But errors out with the message of name conflicts with existing module or project. How do i get round this?
Thanks for the help.
Cheers
Created a link via a button from an in-house application to excel which works fine. But for it to work excel must be referenced from within the application otherwise it fails.
Doing this manually is OK just select the project. But we have numerous PCs to test on so wanted to do this programmatically. Thus, code i thought would work is -
Application.VBE.ActiveVBProject.References.AddFromFile _
"C:\Program Files\Microsoft Office\Office\EXCEL8.OLB"
But errors out with the message of name conflicts with existing module or project. How do i get round this?
Thanks for the help.
Cheers