Help! with copy & paste macro

N

nrage21

trying to copy a range in wkb1 to last blank row in wkb2
(note: wkb=workbook)

Private Sub CommandButton1_Click()

'ignore this statement

If Application.WorksheetFunction.CountA(Range("E7:J7")) < _
Range("E7:J7").Cells.Count Then
MsgBox "Complete ALL Fields"

'need help with the following... :(

Else
Range("C7:J7").Select
Selection.Copy
Workbooks.Open Filename:= _
("C:\My Docs\wkb2.xls")
Range("A65536").End(xlUp).Offset(1, 0).Select
Selection.Paste
Application.CutCopyMode = False
End If
End Sub

TIA'
- Larry -
VBA Amateur

p.s please posters, new members "post only once" I see some of you keep
posting continously... please be considerate to all.
 
T

Tom Ogilvy

set rng = Activesheet.Range("C7:J7")
Workbooks.Open Filename:= _
"C:\My Docs\wkb2.xls"
set rng1 = Activesheet.Range("A65536").End(xlUp).Offset(1, 0)
rng.copy Destination:=rng1
 
N

nrage21

Thanks Tom!
I don't care what Ron de Bruin and others say about you... "you sav
lives"


- Larry -
p.s. just kidding guys! he h
 
N

nrage21

Tom or anyone!

how do you modify the above code to paste values only (not all the
formating, border, shading, etc).

- Larry -
 
N

nrage21

Boy this board has gotten busy!

Has any1 come out with a solution??

- Larry -
VBA Amateu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top