Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_SelectionChange
Quick question to all you Excel sharks out there; can I change the following
code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Rows(ActiveCell.Row).Select End Sub ....to only select the entire row if I actually change ROW and not just cell/range ? (c: Rasmus |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_SelectionChange
Hi Rasmus
If you move from the cell you have selected and have now selected an entire row, your code is redundant since you will be selecting the active row. Am I missing something? -- XL2002 Regards William "Rasmus" wrote in message ogers.com... | Quick question to all you Excel sharks out there; can I change the following | code: | | Private Sub Worksheet_SelectionChange(ByVal Target As Range) | Rows(ActiveCell.Row).Select | End Sub | | ...to only select the entire row if I actually change ROW and not just | cell/range ? | | (c: | Rasmus | | |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_SelectionChange
Apologies, I did not read you post properly - try this.
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static v As Variant If Target.Row < v Then Target.EntireRow.Select v = Target.Row End Sub -- XL2002 Regards William "William" wrote in message ... | Hi Rasmus | | If you move from the cell you have selected and have now selected an entire | row, your code is redundant since you will be selecting the active row. Am I | missing something? | | -- | XL2002 | Regards | | William | | | | "Rasmus" wrote in message | ogers.com... | | Quick question to all you Excel sharks out there; can I change the | following | | code: | | | | Private Sub Worksheet_SelectionChange(ByVal Target As Range) | | Rows(ActiveCell.Row).Select | | End Sub | | | | ...to only select the entire row if I actually change ROW and not just | | cell/range ? | | | | (c: | | Rasmus | | | | | | | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Worksheet_SelectionChange Problem | Excel Discussion (Misc queries) | |||
Worksheet_SelectionChange not working | New Users to Excel | |||
Worksheet_SelectionChange | Excel Programming | |||
worksheet_SelectionChange Event | Excel Programming | |||
Worksheet_SelectionChange Event | Excel Programming |