View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Create New Workbook and copy sheets from my Speadsheet

Sub NewBook()

With ThisWorkbook
.Sheets("Quotation").Copy
Set Newbk = ActiveWorkbook
.Sheets("ClientQuotation").Copy _
after:=Newbk.Sheets(1)
OldName = .Name
NewName = OldName & "-Client" & ".xls"
Newbk.SaveAs Filename:=NewName

End With

End Sub


"Jeffrey" wrote:

Hi All,

Good day. My situation is this, I have a spreadsheet. I need a code
which will create a new workbook and copy the Sheets("Quotation") and
Sheets("ClientQuotation") from my spreadsheet to this new workbook.
The code also needs to rename my new workbook with the same name as my
spreadsheet but with added "-Client". For example my spreadsheet
filename is "qt Auck 1234", then the new workbook should have a name
"qt Auck 1234-Client".

Please advice from anyone.

Cheers.

Jeff