I am trying to create a macro that will automatically click OK on a message box that pops up on excel files. This message says "Document 'XYZ' should be opened in read-only unless you need to save changes" We have our system linked to ODC and we are tying to commit documents. Problem is when it comes to these excel docs, this message box gets in the way and the docs cannot commit unless someone stands there and manually says OK on all the docs.

Anyway, I know that excel has a global workbook called Personal.xls and that when any other workbook is opened, the Personal.xls workbook is also opened (hidden). Any macros stored in this Personal.xls workbook will execute.

I have tried many things such as saying

Application.DisplayAlerts = False
Application.EnableEvents = False

etc... and nothing worked

The only thing I have been able to do sucessfully is to fire an additional message box in front of the one I do not want.

Any help as to how to say "OK" on this MsgBox is greatly appriciated.