Posted to microsoft.public.excel.programming
|
|
VBA Open Wkbook Disabling Macros
Dave,
Never mind. I found why it wouldn't process if the workbook was already open.
Thanks
--
Thanks for your help.
Karen53
"Dave Peterson" wrote:
This doesn't sound like excel's usual behavior to me.
If you're opening a workbook from code in another workbook's project, then excel
should already trust that workbook.
I don't have a suggestion why this is happening to you or how you can avoid it,
but something ain't normal.
If you create a couple of small workbooks and do a test, do you see the security
prompt?
Karen53 wrote:
Hi Ron,
Thank you for the reply.
Sorry, I wasn't clear with what I needed.
The workbook being opened comes up with the security window asking to
'Enable' or' Disable Macros'. I need to select 'Disable' with vba.
Application.EnableEvents is already false. Is there a way to do this?
--
Thanks for your help.
Karen53
"Ron de Bruin" wrote:
If you want to stop the events from running when you open a workbook with code you can use
Application.EnableEvents = False
Code
Application.EnableEvents = True
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Karen53" wrote in message ...
Hi,
I need to open a workbook with VBA and disable the macros. How would I do
this?
Workbooks.Open("C:\Documents and Settings\Me\Desktop\New
Workbooks\MywkBook.xls")
--
Thanks for your help.
Karen53
--
Dave Peterson
|