View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default on _SelectionChange Copy Range to Second Worksheet

Dan,

Does this do what you want?

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)

If Sh.Name = "Sheet1" Then
Target.EntireRow.Resize(6).Copy _
Destination:=Sheet2.Range("A1")
End If

End Sub

hth,

Doug

"Dan" wrote in message
...
I have 2 worksheets. Whenever the active cell is changed in sheet 1 I want

to copy the contents of the current row plus the next 5 rows to the top of
Worksheet 2. Depending on what row is active will determine where the row
selection will start for the copy.

I am using VB and Excel 2002.

Thanks in advance - Dan