ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protect workbook & keep change history (https://www.excelbanter.com/excel-programming/341554-protect-workbook-keep-change-history.html)

Tempy

Protect workbook & keep change history
 
Hi all, i recorded a macro to do the above and then changed it for
"ActiveWorksheet" and now i get the following error mesage:
Run-time error '1004' Method "HighlightChangesOptions' of
Object'_Workbook' Failed ?? Could somebody please help

Sub ProtectWorksheetStd()
'
'

Columns("H:H").Locked = False
ActiveSheet.EnableSelection = xlUnlockedCells
ActiveSheet.Protect Password:="secret", Scenarios:=True
ActiveWorkbook.KeepChangeHistory = True
ActiveWorkbook.Save
With ActiveWorkbook
.HighlightChangesOptions When:=xlAllChanges, Who:="Everyone",
Whe= _
"H:H"
.ListChangesOnNewSheet = False
.HighlightChangesOnScreen = True
End With
Range("H3").Select

End Sub



Tempy

*** Sent via Developersdex http://www.developersdex.com ***


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

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