![]() |
#1
|
|||
|
|||
![]()
Hi All,
I am trying to make the current row being edited highlighted using the selection change event, what I have to do is first save the current row's cell formats (in say A1000:AM1000), then highlight the row, if I stay on that row do nothing and if I select another row restore the previous rows formatting, then highlight the new row. Is there a way to stop the code from running every time the selection changes or do I need VBA to handle selecting the row to paste the current rows formatting then returning to the selected row, without the code trying to run again. I have made a start on the code but got stumped debugging the re-running of the code before the sub finished, even in VBA selecting another row fires off the selection change event again. Any help is appreciated. Code:
'Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) 'H_Row = Selection.Row 'Range("A" & H_Row, "AL" & H_Row).Select ' Selection.Copy ' Range("A70").Select ' Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False 'Range("AJ1") = 6 'Selection.Interior.ColorIndex 'End Sub |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
sparkle | Excel Programming | 2 | 08-03-2014 02:26 AM |