Thread: excel macro
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default excel macro

I don't know how you determine the lastrow or what you mean by record set, but
maybe this will help:

Option Explicit
Sub testme01()

Dim myRow As Range
Dim iRow As Long

With ActiveSheet
Set myRow = .Rows(2)
For iRow = 4 To 2000 Step 2
myRow.Copy _
Destination:=.Rows(iRow)
Next iRow
End With

End Sub




yankeefan wrote:

I need to do the following inside an excel macro. I will insert some
information on row 2 of a spreadsheet. I need that row copied and pasted on
all even rows of that spreadsheet until the end of the recordset, starting
on row 4. Can anyone help with the code?


--

Dave Peterson