simple question

P

patele

Another way:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.ScrollArea = "A1:J20"
End Sub

E
 
D

Dave Peterson

I'm not sure I'd use the _selectionchange event. To toggle that setting to the
same range address each time you change selection seems a little overkill to me.
 
D

Dave Peterson

Each time the user changes the selection, this code will run:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.ScrollArea = "A1:J20"
End Sub

After it's been set the first time, it's not changing anything.

But the code still runs each and everytime the user changes the selection.
 
Top