Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default How to write a macro to open a file read-only?

I appreciate your help but... I can't use workbooks.open because it
doesn't support all the options for opening delimited text files in the
way I need to. For example you can't select whether or not it's to
treat multiple delimeters as one or select mulitple delimeters.
-mark

JMB wrote:

you can use workbooks.open to open a text file. just set the format named
argument to specify the delimiter you need as well as the readonly argument.

see help for the open method.

"dominicb" wrote:


Hi Mark

This is what I put in answer to your other question further down the
page:


Good afternoon Mark

Try this

Workbooks.Open Filename:= "C:\TestFile.xls", ReadOnly:=True

The ReadOnly function does seem to be documented, but not to a great
extent. But it works.

It certainlyworks in Excel 2003.

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=376539



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
I have a read only xl file, I need it to be read and write drama queen Excel Discussion (Misc queries) 3 July 1st 06 12:25 AM
read only file-need to write judithbear Excel Discussion (Misc queries) 4 January 17th 06 03:31 PM
How can a file be converted from Read-Only to Read/Write Jim in Apopka Excel Discussion (Misc queries) 2 November 19th 05 04:59 PM
How do I write an Excel macro to open a file using the CommonDial. Lynn Excel Programming 2 March 30th 05 02:31 PM
Open file to write and read at the same time Tom Ogilvy Excel Programming 2 September 22nd 03 01:10 PM


All times are GMT +1. The time now is 12:33 PM.

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"