Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read & Write Access

Status
Not open for further replies.

SgtPepps

IS-IT--Management
May 1, 2002
109
GB
Is there a way of having an xls open with read only access and then have the rights changed to write access with vba?
 
Hellooooooo Sarge
I was about to give up on this as not possible or leave it to someone wot is clevva. But then I came up with this!

Sub WriteAccess()
ThisWorkbook.ChangeFileAccess xlReadWrite
End Sub

It will ask you if you want to open your book as read onlly in the same way that happens when you open the file in the first place.

;-) If a man says something and there are no women there to hear him, is he still wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top