Code:
Sub clsoing()
''ThisWorkbook.ChangeFileAccess Mode:=xlReadOnly
'ActiveWorkbook.ReadOnlyRecommended = True
ActiveSheet.Protection.AllowEditRanges.Add Title:="Range1", Range:=Columns( _
"A:AI")
With ActiveSheet
.Protect Password:="test", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
.EnableSelection = xlUnlockedCells
.EnableSelection = xlNoRestrictions
End With
End Sub
Hello,
I have that code to make workbook to be protected. However I had to add "AllowEditRange" code to let users do perform sort by in the workbook.
However, I do not want to make users save files after changing data. I've tried 2 read only codes above "AllowEditRange" code, but users are able to edit file, if they open up file not as read only.
Is there any good solution to users not save work over original file?
**This is not macro enable workbook.
Thank you!