copy, paste and save file

  • Thread starter Thread starter Hoob-n-Tam
  • Start date Start date
H

Hoob-n-Tam

Very basic stuff here...

Trying to cut (B2:K2) from book1, sheet 1 and paste into closed Book 2,
sheet 1 next empty row down (B:K) Then save the changes/close book 2.


Any help would be greatly appreciated.
Thanks, Dwayne
 
If you can do it manually, turn on the macro recorder and redo it. The macro
can then be rerun as required.
 
Really, the only problem I am having is getting the data to paste to the
next empty row down in book2.


Thanks, Dwayne


Nigel said:
If you can do it manually, turn on the macro recorder and redo it. The macro
can then be rerun as required.






----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
Really, Yes, amazing I know.

If you wish to find the last row in use then try this ......

vRowMax = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row

then use vRowMax plus any space you require after the last row to set the
paste location.

You will need to open the sheet first.
 
Very basic recording of a macro
Sub Macro6()
' Macro6 Macro
' Macro recorded 11/15/2003 by Don Guillett
Range("A2:E8").Select
Selection.Copy
Workbooks.Open Filename:="C:\yourfolder\yourfile.xls"
Range("C1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWindow.Close
End Sub

if both are already opened you can use
Range("A2:E8").Copy Workbooks("yourfile.xls")Range("C1")
be sure to save the destination workbook before closing
 
Back
Top