Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy part of a worksheet into a worksheet in the same file/keepi. | Excel Worksheet Functions | |||
copy part of row | Excel Programming | |||
copy part of row | Excel Programming | |||
copy part of row | Excel Programming | |||
Copy and Paste part II | Excel Programming |