![]() |
Asking users to Enable Macro's
I'm trying to open an Excel spread sheet from VB. The spread sheet
contains macro's. I'm using code like Dim ex As Excel.Application Set ex = New Excel.Application Dim wb As Excel.Workbook Set wb = ex.Workbooks.Open(FilePath, 1) The sheet opens OK but it doesn't ask if macro's should be allowed or not. Without macro's the rest of my solution doesn't work. Does anyway know how I can ensure this screen appears? |
Asking users to Enable Macro's
I use this in Excel 2000.
It opens the workbooks and the macros can be run. It bypasses the macro alert dialog. Workbooks.Open Filename:= _ "C:\Documents and Settings\me\My Documents\Misc\ToDoList.xls" -- steveB Remove "AYN" from email to respond wrote in message oups.com... I'm trying to open an Excel spread sheet from VB. The spread sheet contains macro's. I'm using code like Dim ex As Excel.Application Set ex = New Excel.Application Dim wb As Excel.Workbook Set wb = ex.Workbooks.Open(FilePath, 1) The sheet opens OK but it doesn't ask if macro's should be allowed or not. Without macro's the rest of my solution doesn't work. Does anyway know how I can ensure this screen appears? |
Asking users to Enable Macro's
Sounds like the security settings are set to disable all macros (Low). Go to tools on the toolbar, Marcos and then Security. Then select Medium to be asked about all macros in future. wrote in message oups.com... I'm trying to open an Excel spread sheet from VB. The spread sheet contains macro's. I'm using code like Dim ex As Excel.Application Set ex = New Excel.Application Dim wb As Excel.Workbook Set wb = ex.Workbooks.Open(FilePath, 1) The sheet opens OK but it doesn't ask if macro's should be allowed or not. Without macro's the rest of my solution doesn't work. Does anyway know how I can ensure this screen appears? |
Asking users to Enable Macro's
Security is set to Medium.
I don't want to bypass the macro question screen. |
Asking users to Enable Macro's
f1capsicum
before opening the workbook, this should ensure correct macro warnings: ex.visible = true ex.AutomationSecurity = msoAutomationSecurityByUI DM Unseen |
All times are GMT +1. The time now is 01:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com