Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default copy range and formats to new workbook

Hi,

How do i modify this code below to copy 4 different sheets in same
workbook
to another workbook and 4 new sheets, the new workbook is called
"C:\MyFolder\Newfile.xls"
all with the same criteries as down below.

Private Sub CommandButton1_Click()
Workbooks.Add
Application.Activeworkbook.Worksheets(1).Name = "Other"
With Application.ActiveWorkbook.Worksheets("Other")
me.cells.copy Destination:=.Range("A1")

.Range("34:65536").EntireRow.Delete
.Range("V:IV").EntireColumn.Delete
Application.DisplayAlerts = False
.Parent.SaveAs "C:\MyFolder\Newfile.xls"
Application.DisplayAlerts = True
End With
End Sub


AHA
Ole



--
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at få 41 spam-mails.
Betalende brugere får ikke denne besked i deres e-mails.
Hent den gratis her: www.spamfighter.dk


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 only values and formats of worksheets to new workbook rvd Excel Worksheet Functions 3 January 31st 07 12:43 PM
Copy range and formats to new Workbook ole_ Excel Programming 4 May 18th 05 09:57 AM
Copy Cells formats to another workbook koala[_18_] Excel Programming 1 November 15th 04 12:33 PM
Copy worksheet values and formats into another workbook Rick_Wendt Excel Programming 1 October 20th 04 08:14 PM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM


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