D
Db1712
Is there a way to highlight a cell currently in use if the sheet i
protected. I found this code in my search however it does not wor
with a protected sheet. Thanks for any help with this in advance.
1. Use ALT + F11 to open the VB editor
2. Double click 'ThisWorkbook' in the Project Explorer
3. Paste the following:
Dim PrevCellCol As Long, PrevCellRow As Long
4. In the Code, select 'Workbook' -> Workbook_SheetSelectionChange
5. Paste the Following:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVa
Target As Range)
If PrevCellCol = 0 Then
PrevCellCol = ActiveCell.Column
PrevCellRow = ActiveCell.Row
Else
Cells(PrevCellRow, PrevCellCol).Interior.ColorIndex = xlNone
End If
ActiveCell.Interior.ColorIndex = 22
PrevCellCol = ActiveCell.Column
PrevCellRow = ActiveCell.Row
End Su
protected. I found this code in my search however it does not wor
with a protected sheet. Thanks for any help with this in advance.
1. Use ALT + F11 to open the VB editor
2. Double click 'ThisWorkbook' in the Project Explorer
3. Paste the following:
Dim PrevCellCol As Long, PrevCellRow As Long
4. In the Code, select 'Workbook' -> Workbook_SheetSelectionChange
5. Paste the Following:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVa
Target As Range)
If PrevCellCol = 0 Then
PrevCellCol = ActiveCell.Column
PrevCellRow = ActiveCell.Row
Else
Cells(PrevCellRow, PrevCellCol).Interior.ColorIndex = xlNone
End If
ActiveCell.Interior.ColorIndex = 22
PrevCellCol = ActiveCell.Column
PrevCellRow = ActiveCell.Row
End Su