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: 1
Default Copy part of worksheet in VBA


Ron De Bruin helped me with the following code

Code
-------------------
Sub test()
Dim wb As Workbook
ActiveSheet.Copy
Set wb = ActiveWorkbook
With wb.Sheets(1)
.UsedRange.Copy
.UsedRange.PasteSpecial xlPasteValues
.Cells(1).Select
Application.CutCopyMode = False
End With
wb.SaveAs "C:\" & wb.Sheets(1).Name & ".xls"
wb.Close False
End Su
-------------------


It copies a worksheet to a seperate file.
But what if I only want to copy C5:K34 to the new file (content no
functions, as above

--
Ruath
-----------------------------------------------------------------------
Ruatha's Profile: http://www.excelforum.com/member.php...fo&userid=3108
View this thread: http://www.excelforum.com/showthread.php?threadid=55174

 
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 part of a worksheet into a worksheet in the same file/keepi. JTB Excel Worksheet Functions 1 September 23rd 06 09:13 AM
copy part of row hme Excel Programming 0 November 15th 04 11:13 AM
copy part of row hme Excel Programming 3 November 13th 04 02:16 PM
copy part of row hme Excel Programming 0 November 13th 04 01:03 PM
Copy and Paste part II ste mac Excel Programming 2 November 3rd 03 12:39 PM


All times are GMT +1. The time now is 07:12 PM.

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"