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: 2
Default Application activation and pasting

All,

I am trying to create a macro to select all data in a current workbook, copy
it to the clipboard, create a new workbook and paste the data into that
workbook. This is a sample of the code I am using:

Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Copy
Workbooks.Add
Workbooks(2).Activate
Range("A1").Select
ActiveSheet.Paste

This code results in a new workbook being generated, the focus going to the
new workbook, but the paste command is pasted overtop of my original
spreadsheet... Any help would be appriciated.

Thank you,
Sam Barnhouse


 
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
activation key LewisT Excel Discussion (Misc queries) 2 March 24th 10 05:27 AM
Cell formatting when pasting from a non-Office application Nancy S[_2_] Excel Discussion (Misc queries) 2 June 22nd 09 06:50 PM
Activation Request Harry Excel Discussion (Misc queries) 2 September 15th 07 05:22 AM
Sheet activation CWillis Excel Discussion (Misc queries) 5 June 1st 06 09:50 PM
application.volatile activation Conceptor[_3_] Excel Programming 5 October 13th 04 09:59 PM


All times are GMT +1. The time now is 01:36 AM.

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

About Us

"It's about Microsoft Excel"