View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
UofMoo[_5_] UofMoo[_5_] is offline
external usenet poster
 
Posts: 1
Default VB to copy invoices


To copy a larger range, just modify the range:

Sheets("custinfo").Range("A1:C6").Copy _
Destination:=Sheets("invoice").Range("C2")

That should still work for you...
if you want to specify, you'd toss it in a loop like:

destinationRow = 5
for myrow=1 to 7
Sheets("custinfo").Range("A"&myrow&":C"&myrow).Cop y _
Destination:=Sheets("invoice").Range("C"&destinati onRow)
next

if you have this code in a Sub() then you can link the button to th
sub by right clicking on the button and select Assign Macro then selec
the sub from the list.
Hope that works :

--
UofMo
-----------------------------------------------------------------------
UofMoo's Profile: http://www.excelforum.com/member.php...fo&userid=2648
View this thread: http://www.excelforum.com/showthread.php?threadid=39760