Open Excel file as Read Only with code,

  • Thread starter Thread starter yogendra joshi
  • Start date Start date
Y

yogendra joshi

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top