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!

Detecting If Excel Workbook is already open 1

Status
Not open for further replies.

OzzieOwl

Technical User
Dec 13, 2001
45
GB
I have an Excel workbook, which several people use, however I need to restrict user opening an using the file on a read only basis. Can anyone tell me how to detect in VBA if the file has been opened on a read only basis, so I can then force the Excel sheet to close.

Any Help Greatly appreciated.
 
If ActiveWorkbook.ReadOnly = True 'It's Read-Only

You can also force it to be opened as read only in the SaveAs>Options menu.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top