I am interested in an extended VBA code solution at this link How to tell if someone unprotected a worksheet (by author @Jaafar Tribak).
If I have multiple sheets. All Sheets contain some locked cells, Sheet is protected.
How to control multiple Sheets in the same Workbook (eg Sheet1, Sheet2, Sheet3).
I added two columns to the 'LogSheet', but I need VBA code that will return the data for those columns.
I addes two columns named 'Password' and "Sheet Name" (on the 'LogSheet' tab).
In which it will be seen on which Sheet the change was made and which password was entered by the user who re-locked the Sheet.
Is it possible?
If I have multiple sheets. All Sheets contain some locked cells, Sheet is protected.
How to control multiple Sheets in the same Workbook (eg Sheet1, Sheet2, Sheet3).
I added two columns to the 'LogSheet', but I need VBA code that will return the data for those columns.
I addes two columns named 'Password' and "Sheet Name" (on the 'LogSheet' tab).
In which it will be seen on which Sheet the change was made and which password was entered by the user who re-locked the Sheet.
.......
.......
___________________________ Helper Routines ________________________________________________
Private Sub LogInfo(ByVal Status As PROTECTION_STATUS, ByVal SaveInfoToDisk As Boolean)
With Sheets(LOG_SHEET_NAME)
.Cells(1, 1) = "Protection Status"
.Cells(1, 2) = "User Name"
.Cells(1, 3) = "Time Stamp"
.Cells(1, 4) = "Entered Password"
.Cells(1, 5) = "Sheet Name"
.Cells(.Cells.Rows.Count, 1).End(xlUp).Offset(1) = IIf(Status = Protected, "Sheet Protected", "Sheet Unprotected")
.Cells(.Cells.Rows.Count, 1).End(xlUp).Offset(, 1) = Environ("UserName")
.Cells(.Cells.Rows.Count, 1).End(xlUp).Offset(, 2) = Format(Date, "Short Date") & " @ " & Format(Time, "Long Time")
'I need a VBA code that will display the last entered password ??????????????????
'I need VBA code for Sheet name where the password has been changed ??????????????????
.Columns("A:E").EntireColumn.AutoFit
.Range("A1:E1").Font.Bold = True
End With
If SaveInfoToDisk Then Me.Save
End Sub
.......
.......
Is it possible?