View Single Post
  #19   Report Post  
Posted to microsoft.public.excel.programming
William Benson[_2_] William Benson[_2_] is offline
external usenet poster
 
Posts: 230
Default How do i open a new instance Excel?

Took me forever to get around to revisiting this thread ... but thanks for
the heads up about AutomationSecurity.

"Tushar Mehta" wrote in message
om...
This addresses only the part about macro warnings. That lack of
warning is by design (and configurable). When code opens a workbook
containing macros, it is subject to the AutomationSecurity property.
The default value of that property is msoAutomationSecurityLow.

My guess is that MS decided that if you trust the code that is
currently running, you trust any code that it, the currently executing
code, chooses to invoke.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , wbenson1
@nycap.rr.com says...
I see. As an interesting side note, but in keeping with my original
question
(you answered why Personal doesn't open, but missed the heart of my
concern)
it opens any unopen file without warnings about read-only (or macros, for
that matter). In fact, if the calling procedure is from a file with
macros
enabled, you will not be asked if you want the called file to be opened
with
or without macros.

This produced an interesting (please don't try this with any other apps
running and I suggest saving all your work cuz ya gonna need to shut down
the HARD WAY) effect: I put Fred's code into the Workbook_Open sub of
the
file Book1 on C: and it called itself recursively when opened ... I was
given only one chance to say Yes/No to macros, then BOOM.

I repeat, I wouldn't try it.

And I have learned NEVER EVER EVER say Yes to macros the first time you
open
a file ... and be sure to look at ALL the code before you ever try it
WITH
macros enabled.

Thanks,

Bill

"Norman Jones" wrote in message
...
Hi William,

See also MSKB 213489:
Add-Ins Don't Load When Using the CreateObject Command

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

---
Regards,
Norman



"Norman Jones" wrote in message
...
"William Benson" wrote in message
...
Any idea why this opens an instance without the message that certain
workbooks are already locked for editing (e.g., Personal.XLS)?


The code ONLY loads the designated workbook (Book1.xls). AddIns and
files
in the XLStart folder, such as Personal.xls, do not get
loaded.Consequently, the question of locked files does not arise.

Hit Alt-F11 and look at the files in the VBE.

---
Regards,
Norman