Excel -Copy Macro Problem

Closed
Monkey - Sep 3, 2008 at 04:41 AM
 Dragonruler12 - Dec 5, 2008 at 12:27 PM
Hello,

I have developed a macro (attached to a button) that copies data from one row (cells D8, E8, F8 & G8) to a sheet called transmittals. Every time the button is clicked it will then copy the data to the next available line on the transmittals sheet. Basically I want to copy the button down the source sheet many times, and I would like it to change the cell references automatically, so I dont have to. Please can you help me?

Here is my code:

Sub Copy()
mycount = Range("A12") + 1
Range("A12") = mycount
Range("D8,E8,F8,G8").Select
Range("G8").Activate
Selection.Copy
Sheets("Transmittals").Select
Range("A4").Offset(mycount, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

End Sub
Related:

2 responses

lexmarkd Posts 11 Registration date Tuesday September 2, 2008 Status Member Last seen April 1, 2009 5
Sep 3, 2008 at 07:21 AM
cant you find any hint in the help file of excel itself?
2
Dragonruler12
Dec 5, 2008 at 12:27 PM
Cant you use the Selection.Offset(Row,Column) which I believe is what you are asking. Move the active cell around by doing that.
1