A
Alan
Hi All,
I wasn't sure whether this should be a Word or Excel query so I have
cross-posted. Apologies if anyone objects!
I am using the following code in a module in Word to open an existing
Excel document:
Sub Open_Plan()
Dim xls As Object
Dim wrk As Object
Dim xlfilename As String
xlfilename = "F:\Alan\Plan.xls"
Set xls = CreateObject("Excel.Application")
xls.Visible = True
Set wrk = xls.workbooks.Open(FileName:=xlfilename, Updatelinks:=0,
ReadOnly:=False, Password:="password")
End Sub
This works fine, except that it seems to skip or ignore the 'ReadOnly
= FALSE' argument, and the file still opens as Read Only every time.
I am stumped as to how to get around this.
Thanks in advance for any help you can provide.
Alan.
I wasn't sure whether this should be a Word or Excel query so I have
cross-posted. Apologies if anyone objects!
I am using the following code in a module in Word to open an existing
Excel document:
Sub Open_Plan()
Dim xls As Object
Dim wrk As Object
Dim xlfilename As String
xlfilename = "F:\Alan\Plan.xls"
Set xls = CreateObject("Excel.Application")
xls.Visible = True
Set wrk = xls.workbooks.Open(FileName:=xlfilename, Updatelinks:=0,
ReadOnly:=False, Password:="password")
End Sub
This works fine, except that it seems to skip or ignore the 'ReadOnly
= FALSE' argument, and the file still opens as Read Only every time.
I am stumped as to how to get around this.
Thanks in advance for any help you can provide.
Alan.