Gil
03-06-2016, 10:07 AM
Hello
I am using this code to increase a cell value by 1 when the workbook is opened
Option Explicit
Private Sub Workbook_Open()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("Sheet1").Range("f7").Value = Sheets("Sheet1").Range("f7").Value + 1
End Sub
All works well but I want to protect the cell to stop the number being changed.
I am using this code to increase a cell value by 1 when the workbook is opened
Option Explicit
Private Sub Workbook_Open()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("Sheet1").Range("f7").Value = Sheets("Sheet1").Range("f7").Value + 1
End Sub
All works well but I want to protect the cell to stop the number being changed.