View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Pete McCosh[_5_] Pete McCosh[_5_] is offline
external usenet poster
 
Posts: 59
Default Open As Readonly

Ths code will do what you want, just replace the full file
name in the quotes. If you look at the VBA help for the
Open method, you'll see that you can add qualifiers to the
basic command to do pretty much anything you might want to
when opening a file.

workbooks.Open filename:="C:\amendments.xls",readonly:=true

Cheers, Pete

-----Original Message-----
I'm trying to get my macro to open a file as Readonly,

but
all I can do is get it to open a file. When I look at

the
code that is created for opening, opening as readonly and
opening as copy, it all looks exactly the same.


.