here is how i can open excel file in vbA:
Workbooks.Open(file-path)
Is there a way to indicate that it should be read-only? opening im files have a password on them, and I always get a dialog that it can be opened as soon as read.
It works?
Workbooks.Open Filename:=filepath, ReadOnly:=True
Or as indicated in a comment to save a link to an open book:
Dim book As Workbook Set book = Workbooks.Open(Filename:=filepath, ReadOnly:=True)
Check the language link:
http://msdn.microsoft.com/en-us/library/aa195811(office.11).aspx
expression.Open(FileName, UpdateLinks, ReadOnly, Format, Password, WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify, Converter, AddToMru, Local, CorruptLoad)