View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Programmatically opening workbooks in macros brings up Enable

I hate when there's no explanation for the fix. But I do like that it works!

I don't see anything in that line of code that would cause the procedure to
stop.

You don't have anything hidden by "on error resume next" statements do you?
(Just a silly guess.)

Barb Reinhardt wrote:

Dave, it started working again and I didn't change anything that would "fix"
it. I'm guessing poltergeists are on my machine!

Thanks for your help.
Barb Reinhardt

"Dave Peterson" wrote:

Do you start the code that opens the workbook by using a shortcut key
combination? If yes, then do you have a shift-key in that shortcut.

If you do, then this applies. Remove the shift-key from the shortcut key
combination and the code should continue.

Barb Reinhardt wrote:

I did find this article in the KB. Not sure if it applies though.

http://support.microsoft.com/default...b;en-us;555263

Barb Reinhardt

"Dave Peterson" wrote:

I don't think I've ever seen excel do this.

Just some things to try...

Have you closed excel and restarted?
Have you rebooted your pc?

If you have and neither helped, take a look at AutomationSecurity in VBA's help.

But I don't think I've ever had to use this when using code to open other
workbooks that contain macros.

Barb Reinhardt wrote:

I've been programmatically opening workbooks using Excel 2003 using the
following statement

Set oWB = Workbooks.Open(oldPath, UpdateLinks:=False, ReadOnly:=True)

Today, for the first time, every time a workbook is opened, I get the "Do
you want to enable macros" question. To make it even more complicated, our
organization is just starting to deploy office 2007, so I'm not sure if any
of these workbooks have been edited using 2007.

I'm thinking that using Application.DisplayAlerts = FALSE before the open
statement should resolve my problem, but I'm wondering why it started now.
These workbooks have had macros for over a year.

Any ideas?

Thanks,
Barb Reinhardt

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson