Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy Range to new workbook

I am wondering how I would copy a specified range to a new workbook
using VBA.

1. Make the selection in the in and place the contents in the
first workbook -- WB1 -- onto the clipboard.

2. Create / add a new workbook -- call this WB2.

3. Past the contents of the clipboard to WB2

If anyone has some code that I can look at it would be greatly
appreciated as I can make this work with a new worksheet but and
messing it up with the new workbook.

Thanks for the help.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Copy Range to new workbook

Sub CopyRangeToNewBook()
Sheets("Sheet1").Range("a1:b2").Copy
Workbooks.Add
ActiveSheet.Paste
End Sub

--
Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


"mmasters" wrote in message
...
I am wondering how I would copy a specified range to a new workbook
using VBA.

1. Make the selection in the in and place the contents in the
first workbook -- WB1 -- onto the clipboard.

2. Create / add a new workbook -- call this WB2.

3. Past the contents of the clipboard to WB2

If anyone has some code that I can look at it would be greatly
appreciated as I can make this work with a new worksheet but and
messing it up with the new workbook.

Thanks for the help.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



Reply
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
How to copy a range of cells and paste into a new workbook in differentcolumns Mas[_4_] Excel Discussion (Misc queries) 3 August 16th 11 02:57 PM
Copy a Range from each workbook - Ron de Bruin VBA - a problem Philip[_2_] Excel Worksheet Functions 5 March 11th 07 06:07 AM
copy range from one workbook to other in C# asp newbie Excel Worksheet Functions 0 May 17th 06 06:44 AM
How to use VLOOKUP to copy range to another workbook? UNISON Issy Excel Discussion (Misc queries) 1 March 27th 06 06:00 PM
copy range of cells from one workbook to another mitmeez Excel Discussion (Misc queries) 1 December 9th 04 08:14 PM


All times are GMT +1. The time now is 11:42 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"