Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Skip Read-only message

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
dq dq is offline
external usenet poster
 
Posts: 46
Default Skip Read-only message

Set parameter 7 of the Open command to True to open read/write
Call Workbooks.Open("MyFile", , , , , , True)
or to simply surpress the message set Application.Displayalerts =
false
(don't forget to turn back on again)

DQ

  #3   Report Post  
Posted to microsoft.public.excel.programming
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
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
Read only message caused by camping out in file Rhett C[_2_] Excel Discussion (Misc queries) 5 October 29th 08 07:16 PM
Unable to read message jvazquezpmi Excel Discussion (Misc queries) 0 September 28th 06 04:49 PM
Saving spreadsheet gives read only error message Scott Excel Discussion (Misc queries) 1 March 15th 06 11:44 PM
Help Read-Only message, Discussion group ideas all used Sue Excel Discussion (Misc queries) 3 July 29th 05 05:29 AM
Message--MEMORY COULD NOT BE READ mcrmike[_3_] Excel Programming 0 July 19th 04 09:30 PM


All times are GMT +1. The time now is 04:29 PM.

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

About Us

"It's about Microsoft Excel"