View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Skip Read-only message

Take a look at VBA's help for Open and you'll see:

Opens a workbook.

expression.Open(FileName, UpdateLinks, ReadOnly, Format, Password,
WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable,
Notify, Converter, AddToMru, Local, CorruptLoad)

So you'd do:

dim wkbk as workbook
set wkbk = workbooks.open(filename:="C:\something.xls", readonly:=true)
....


CV323 wrote:

I have a macro that will open a read-only file - is there a code so that the
pop-up "this file is a read-only file, etc." doesn't pop up?

Thank you


--

Dave Peterson