Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Security is set to Medium.
I don't want to bypass the macro question screen. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
f1capsicum
before opening the workbook, this should ensure correct macro warnings: ex.visible = true ex.AutomationSecurity = msoAutomationSecurityByUI DM Unseen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Force users to enable macros when open a workbook | New Users to Excel | |||
Auto-Enable Macro's | Excel Programming | |||
Encourage users to enable macros | Excel Programming | |||
Forcing users to enable macros | Excel Programming | |||
enable/disable macro's dialog? | Excel Programming |