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: 130
Default how to copy worksheet to new workbook with values only

Hello,
I'm trying to save one sheet in one workbook as a new workbook. My
code is shown below. There is one range on the worksheet which has
formulas in it. That range is named "customer_name". I don't want to
copy the formulas. I want only values to go to the new workbook.

The code I have below works, but it is slow. I was wondering if there
was a way to modify the Worksheets("PO").copy command so that it only
copies only values.

thanks in advance for your help.
Andy

Dim wb As Workbook
Worksheets("PO").Copy
Set wb = ActiveWorkbook
wb.SaveAs "NEW_NAME.XLSX"

wb.Worksheets("PO").Range("customer_name").Select
selection.Copy
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

wb.Close
 
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
Copy values of worksheet a to workbook b Nev Excel Discussion (Misc queries) 5 April 8th 09 09:35 PM
Copy Values From Worksheet to another Worksheet same Workbook Joe K. Excel Programming 1 October 6th 07 08:45 PM
Copy Values from WorkSheet back to Another Workbook Replacing Values in Worksheet bobwilson[_16_] Excel Programming 0 April 3rd 06 09:50 PM
automatically copy values of worksheet into new workbook Jane Excel Programming 4 July 7th 05 03:10 PM
Copy worksheet values and formats into another workbook Rick_Wendt Excel Programming 1 October 20th 04 08:14 PM


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