Remore open a macro enabled excel file without running macros

SeniorTom

Board Regular
Joined
Jun 5, 2017
Messages
96
I have 2 files 1.xlsm and 2.xlsm. Both have instruction messages when they are opened. when 1.xlsm opens 2.xlsm it is only using it for the data in the spreadsheet cells and doesn't need the open message or enable any macros. Is there a way to bypass the open message, the "the workbook contains links..." or "enable Macro" messages. I'm using "Workbooks.Open" to open it.

Regards
Tom
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Open the VBA editor in the file that you need to modify, double-click on ThisWorkBook to open up the macro text.
You can then delete the text.
 
Upvote 0
I may not have been clear.

2.xlsm, when being loaded, needs the macro so the user knows how to enter data and run the macro with a double click. After it is loaded by the user, 1.xlsm uses the data that had been loaded int 2.xlsm and fills in cells on 1.xlsm. It doesn't need to see the messages and use the macros. The macros can't be deleted because 2.xlsm will be updated again by the user.
 
Upvote 0
Hia
try
Code:
Application.EnableEvents = False
Workbooks.Open Filename:="######"
Application.EnableEvents = True
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top