close

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(quot;Completed Projectsquot;).Select
ActiveCell.Offset(-4, 0).Range(quot;A1:F1quot;).Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range(quot;A1quot;).Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range(quot;A1quot;).Select
Sheets(quot;Current Projectsquot;).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
ActiveCell.Offset(10, 0).Range(quot;A1quot;).Select
End Sub

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

I really appreciate any assistance or suggestions.
Thanks,

--
Vicky


Vicky Wrote:
gt;
gt; ActiveCell.Offset(1, 0).Range(quot;A1quot;).Select
gt; Selection.End(x2Down).Select
gt; ActiveCell.Offset(1, 0).Range(quot;A1quot;).Select
gt; ActiveSheet.Paste
gt; ActiveCell.Offset(1, 0).Range(quot;A1quot;).Select
gt;
gt; I really appreciate any assistance or suggestions.
gt; Thanks,
gt; 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: www.excelforum.com/member.php...oamp;userid=31708
View this thread: www.excelforum.com/showthread...hreadid=517895

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()