View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
helen helen is offline
external usenet poster
 
Posts: 105
Default How to Open file as read only

I want to open a file as read only and get some data from. However when I use
the follwoing code and someone already has the file open, it is as if I
never specified read only in the VBA Code.

If Dir(MyPath & LE_Actuals & "\" & Arr(i)) < "" Then
Workbooks.Open (MyPath & LE_Actuals & Arr(i)), 0, ReadOnly = True
ActiveWorkbook.Windows(1).Visible = False