ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Open Worbook and Disable Macros (https://www.excelbanter.com/excel-discussion-misc-queries/48101-open-worbook-disable-macros.html)

DMc2005

Open Worbook and Disable Macros
 
I know how to open a workbook using VBA, but how do i open a workbook and
disable its macros.

D



R. Choate

First, just open Excel by itself and disable macros (ToolsMacrosSecurity, etc.). Then open the workbook with the macros you don't
want to run.

HTH
--
RMC,CPA


"DMc2005" wrote in message ...
I know how to open a workbook using VBA, but how do i open a workbook and
disable its macros.

D




Gary''s Student

Start Excel in Safe Mode:

http://office.microsoft.com/en-us/as...823931033.aspx
--
Gary''s Student


"DMc2005" wrote:

I know how to open a workbook using VBA, but how do i open a workbook and
disable its macros.

D




DMc2005

I am running a macro from a file that opens several other files and enters
data into these files. however these files have macros in them.

so essentially i need to keep macros in my main workbook. but disable the
macros in the other workbooks. i cannot rely on users clicking disable
macros.

D
"R. Choate" wrote in message
...
First, just open Excel by itself and disable macros
(ToolsMacrosSecurity, etc.). Then open the workbook with the macros you
don't
want to run.

HTH
--
RMC,CPA


"DMc2005" wrote in message
...
I know how to open a workbook using VBA, but how do i open a workbook and
disable its macros.

D






Tom Ogilvy

If you want to suppress a Workbook.Open Event

Application.EnableEvents = False
workbooks.Open "C:\MyFolder\Mybook.xls"
Application.EnableEvents = True

This doesn't disable events in the workbook, but it does stop the open event
from running. Leave events disabled if you want to suppress other events.

--
Regards,
Tom Ogilvy

"DMc2005" wrote in message
...
I know how to open a workbook using VBA, but how do i open a workbook and
disable its macros.

D






All times are GMT +1. The time now is 08:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com