Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default 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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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?





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Asking users to Enable Macro's

Security is set to Medium.
I don't want to bypass the macro question screen.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Force users to enable macros when open a workbook Tan New Users to Excel 2 April 15th 07 05:09 PM
Auto-Enable Macro's bhawane Excel Programming 1 June 21st 05 06:02 PM
Encourage users to enable macros Steve Garman Excel Programming 2 May 31st 04 04:54 PM
Forcing users to enable macros universal[_17_] Excel Programming 8 December 20th 03 03:14 PM
enable/disable macro's dialog? Trevor Shuttleworth Excel Programming 0 August 19th 03 10:14 PM


All times are GMT +1. The time now is 08:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"