LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Pasting Between Workbooks

Okay, my macro requires opening two extra workbooks for sorting/copy/pasting
purposes, and I am working on a way to close the extras. This formula Closes
Workbook 1 which leaves Workbook 2 active, I do a Cells.Select, copy and
activate next which brings up the original workbook, then select A1 and
paste. Well the code always stops at the Line:

ActiveSheet.Paste

So what am I doing wrong?

I was going to then follow it with Wiindows("Book2").Activate and have it
close after pasting the good data over all the original document data
essentially leaving me with the single work book open. Make sense? Here is
the code:

Windows("Book1").Activate
Application.DisplayAlerts = False
ActiveWorkbook.Close savechanges:=False
Cells.Select
Selection.Copy
Windows("Book2").ActivateNext
Cells.Select
Selection.AutoFilter
Range("A1").Select
ActiveSheet.Paste
Application.DisplayAlerts = True

THANKS!!!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasting a formula in many different workbooks Playa Excel Discussion (Misc queries) 3 July 18th 06 05:57 PM
Copying and Pasting between Workbooks NothingButRomance Excel Worksheet Functions 0 May 13th 05 09:54 PM
Copying and Pasting between Workbooks NothingButRomance Excel Worksheet Functions 0 May 13th 05 07:33 PM
Copy/pasting between 2 workbooks... Joe Chavera Excel Programming 0 July 23rd 03 10:12 PM
Copy/pasting between 2 workbooks... Bob Phillips[_5_] Excel Programming 0 July 23rd 03 09:21 PM


All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"