1

When I use the following line to open an xls file, sometimes there is a dialog box popping up.

Workbooks.Open Filename:=path & fFile, UpdateLinks:=xlUpdateLinksNever, Password:="", ReadOnly:=True

enter image description here

My question is, whether it is possible to always make Open as Read-Only as default, disable the dialog box or do not let it interrupt the execution of my macro.

Could anyone help?

Community
  • 1
  • 1
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
  • Have you tried `Application.DisplayAlerts = False`? Place it just before the `.Open` and right after place `Application.DisplayAlerts = True` not sure it'll be enough though... – R3uK Oct 15 '15 at 15:41
  • I have tried, it did not help... – SoftTimur Oct 15 '15 at 15:48
  • I've looked around a bit, but it seems that Excel for Mac is the problem here... If you can run that on a PC, you should have any problems (not with ActiveX nor with DisplayAlerts). Hope for you someone find some workaround... – R3uK Oct 15 '15 at 16:02
  • Does "Excel for Mac" have a macro recorder? – Davesexcel Oct 15 '15 at 16:08
  • Sure, "Excel for Mac" has a macro recorder... – SoftTimur Oct 15 '15 at 16:23

0 Answers0