Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Open file as read only
as written you are comparing the uninitialized variable ReadOnly to the
boolean value True. For named arguments you use colon equal ReadOnly:=True -- Regards, Tom Ogilvy "Helen" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FILE CAN ONLY OPEN AS READ ONLY | Excel Discussion (Misc queries) | |||
Can't Open a Read-Only file in Excel 03 | Excel Discussion (Misc queries) | |||
Excel file won't open because it' a read only file when it is not | Excel Discussion (Misc queries) | |||
Open File Read Only | Excel Programming | |||
File in use open read only | Excel Programming |