ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open and Enable xla file from vba code? (https://www.excelbanter.com/excel-programming/400484-open-enable-xla-file-vba-code.html)

Snap

Open and Enable xla file from vba code?
 
Hi -

I am trying to open an add-in (xla file) from vba but I am not
prompted to "enable macros" on it...so the xla file is rendered
useless. My security setting are fine. I can open add-ins via double
click or dragging them into a workbook and I receive the "enable
addins" message box. Here is the code I am using:

Public Sub OpenAddIn()
Workbooks.Open Filename:="\xxxxxxxxxx.xla"
End Sub

Is it possible to open an add-in via vba with macros enabled?

Thanks,
Jason


jerome drean[_2_]

Open and Enable xla file from vba code?
 
yes it is possible since i do it myself
thought i dont see what is wrong with your code
put macro security to lowesst level may be


"Snap" wrote:

Hi -

I am trying to open an add-in (xla file) from vba but I am not
prompted to "enable macros" on it...so the xla file is rendered
useless. My security setting are fine. I can open add-ins via double
click or dragging them into a workbook and I receive the "enable
addins" message box. Here is the code I am using:

Public Sub OpenAddIn()
Workbooks.Open Filename:="\xxxxxxxxxx.xla"
End Sub

Is it possible to open an add-in via vba with macros enabled?

Thanks,
Jason




All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com