ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to make an xls file allow only one user access at a time. (https://www.excelbanter.com/excel-discussion-misc-queries/36233-how-make-xls-file-allow-only-one-user-access-time.html)

garyxprice

how to make an xls file allow only one user access at a time.
 
I have an xls file that I want to lock down and only allow one user at a time
access... I do not even want people to be able to go in with readonly....

Thanks

Dave Peterson

How about closing the workbook if it's opened readonly--and this'll only work if
macros are enabled!

Option Explicit
Sub auto_open()

With ThisWorkbook
If .ReadOnly = True Then
MsgBox "not available in readonly mode!"
.Close savechanges:=False
End If
End With

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

garyxprice wrote:

I have an xls file that I want to lock down and only allow one user at a time
access... I do not even want people to be able to go in with readonly....

Thanks


--

Dave Peterson


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com