I have the following VBA code which does work but am trying to work out how I would make the active cell chosen a different colour to the row and column highlighting, so people can see clearly what cell they have chosen.
Also does anyone know how I could limit the highlighting to show to the left and above the cell selected (my spreadsheet has conditional formatting on other items in the spreadsheet too in case that would have an effect on the code)
I've also just noticed that when I've saved as a Macro Enabled Workbook, when I open it back up the VBA code isnt working - Help !
Thanks
Smiffy
Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Update 20140318
Static xRow
Static xColumn
If xColumn <> "" Then
With Columns(xColumn).Interior
.ColorIndex = xlNone
End With
With Rows(xRow).Interior
.ColorIndex = xlNone
End With
End If
pRow = Selection.Row
pColumn = Selection.Column
xRow = pRow
xColumn = pColumn
With Columns(pColumn).Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
With Rows(pRow).Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End Sub
Bookmarks