Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Open Excel file as Read Only with code,

You can use Open Method with optional parameter ReadOnly = True

See following code

Sub open_Read_Only()
Workbooks.Open Filename:="D:/test.xls", ReadOnly:=True
End Sub

Hope this helps

~Yogendra


Jason Wooten wrote:
I have several spreadsheets that are Read Only, Every macro that I have opens the files but ask if you want to open as Read Only or not,
Is there any way that I can write something that will open the file as Read Only or Read Write without it asking.
I am wanting to put this in the Code, but do not know how..

Thanks in advance for your help..

Jason


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Open Excel file as Read Only with code,

thanks alot of the response.
Okay one more question
Can I make a file read only with code
and can I can code enter a password for a workbook

Thanks Again for all your help

Jason
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
Can't Open a Read-Only file in Excel 03 Josh C Excel Discussion (Misc queries) 0 February 12th 08 10:09 PM
how do i open a read-only or encrypted file in excel? eesicon Excel Discussion (Misc queries) 1 November 28th 05 01:19 AM
Excel file won't open because it' a read only file when it is not IanB Excel Discussion (Misc queries) 1 September 12th 05 01:28 PM
I am getting "unable to read" when trying to open an excel file worf65 Excel Discussion (Misc queries) 4 August 20th 05 11:51 PM
how do i open a file in excel that is encrypted or read only ian c forde Excel Discussion (Misc queries) 0 March 4th 05 02:43 PM


All times are GMT +1. The time now is 02:44 AM.

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"