I'm trying to automate an excel file which has VBA in it. This VBA is protected so I can't access it.
Here is what I need the automated script to do.
- Open the workbook
- Click / dismiss any Msgbox's (Stuck part)
- Enter a cell and let the workbook's vba do it's thing
So I have found I can open the book without popups by using:
var app = new Excel.Application();
app.DisplayAlerts = false;
app.Visible = false;
app.EnableEvents = false;
app.Workbooks.Open(@"path...");
But then the VBA within the book is also disabled so I can't do step 3 above.
How can I just disable all Msg box's then re-enable them at the end?