Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
external usenet poster
 
Posts: 188
Default Opening Excel Workbook from Word using VBA - Always Read Only


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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why are all my Excel docs in Google Groups opening as Read Only? AmyLFisher Excel Discussion (Misc queries) 0 December 7th 09 10:31 PM
How do I stop a Excel 2007 file opening as read only? Will Excel Discussion (Misc queries) 0 September 1st 08 10:03 AM
How do I stop a Excel 2007 file opening as read only? Will Excel Discussion (Misc queries) 1 August 31st 08 11:14 PM
When opening Excel - get Access (Read-Only) file and error DeltaDagger Setting up and Configuration of Excel 1 October 31st 06 10:22 AM
Why are my emailed excel files opening in Read only? Paul Huhn Excel Discussion (Misc queries) 0 March 9th 05 03:57 PM


All times are GMT +1. The time now is 01:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"