Opening other workbooks and ignoring their vba message boxes

PTP86

Board Regular
Joined
Nov 7, 2009
Messages
86
Hi

I've got a macro that opens hundreds of files and pulls data from them.

A few of the files contain a message box that pops up on opening to alert the user that "this file hasn't been updated for over a week"

When this happens it pauses the code of my macro until OK is clicked. Which means I can't go away and leave it to run.


Is there a way of preventing the other workbook's message boxes from appearing or disturbing things?
These are other people's files so I don't want to go deleting that opening message from their code

I've tried Application.DisplayAlerts = False but that didn't do it.


Thanks
 
Last edited:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Try Application.EnableEvents = False

Just remember to put them back on when you're done :)
 
Upvote 0

Forum statistics

Threads
1,217,356
Messages
6,136,079
Members
449,988
Latest member
Mabbas

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