PC Review


Reply
Thread Tools Rate Thread

Copying information into another workbook

 
 
=?Utf-8?B?Vmlja3k=?=
Guest
Posts: n/a
 
      1st Mar 2006
I created a macro to take information from one worksheet and place into
another (same workbook) and put it on the next available line. However, when
I try to do it to a different workbook it doesn't work? Not sure why?

Worksheet to worksheet (works great)
Selection.Copy
Sheets("Completed Projects").Select
ActiveCell.Offset(-4, 0).Range("A1:F1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Current Projects").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
ActiveCell.Offset(10, 0).Range("A1").Select
End Sub

Workbook to workbook (cannot get it to work)
Selection.Copy
Windows("Book3").Activate
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.End(x2Down).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("WORK ORDER.xls").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
ActiveCell.Offset(10, 0).Range("A1").SelectEnd Sub

I really appreciate any assistance or suggestions.
Thanks,

--
Vicky
 
Reply With Quote
 
 
 
 
davesexcel
Guest
Posts: n/a
 
      1st Mar 2006

Vicky Wrote:
>
> ActiveCell.Offset(1, 0).Range("A1").Select
> Selection.End(x2Down).Select
> ActiveCell.Offset(1, 0).Range("A1").Select
> ActiveSheet.Paste
> ActiveCell.Offset(1, 0).Range("A1").Select
>
> I really appreciate any assistance or suggestions.
> Thanks,
> Vicky

Hi Vicky,
haven't tried out your macro,
but I see an error in your (xldown)
you have x2down

could it be a problem??


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=517895

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying worksheets into a new workbook changes information on shee trivill Microsoft Excel Misc 0 9th Jan 2009 10:25 PM
Copying range from selected workbook to open workbook John Microsoft Excel Programming 2 11th Aug 2007 03:49 PM
copying worksheets to a new workbook without formulae referencing original workbook pjdeeb@gmail.com Microsoft Excel Programming 2 16th Oct 2006 07:31 PM
Copying data from workbook/sheets to another workbook/sheet =?Utf-8?B?eXVrb25fcGhpbA==?= Microsoft Excel Programming 0 26th Jul 2006 07:33 PM
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook burl_rfc Microsoft Excel Programming 1 1st Apr 2006 08:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:29 AM.