Hi all,
I have the following procedure:What I want to do if the workbook name is IPI Locater.xlsm is make it read only and also not give the user the ability to save the file. The reason for these criteria is because this particular file is going to be used on our corporate intranet and I need control over the workbook so that people will not be able to change the data in our department's shared drive. Any takers on this?![]()
Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim ws As Worksheet, shtCnt As Long, shtCntr As Long, thisBook As String thisBook = ActiveWorkbook.Name If ThisWorkbook.Name = "IPI Locater.xlsm" Then shtCnt = ThisWorkbook.Sheets.Count For shtCntr = 1 To shtCnt If Sheets(shtCntr).Name <> "Graphs" Then Sheets(shtCntr).Visible = False End If Next shtCntr '''...More code that isn't necessary for this question...''' End Sub
Regards:
Bookmarks