Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I've got code to copy worksheets as individual files, however, once the code is executed and i've got individual files, the page setup is not the same as the original. code is below Sub TEST() Dim NB, MB As Workbook Set MB = ThisWorkbook Dim I, II As Long For I = 1 To MB.Sheets.Count Set NB = Workbooks.Add MB.Sheets(I).Cells.Copy NB.Sheets(1).Range("A1") NB.Sheets(1).Name = MB.Sheets(I).Name For II = 2 To NB.Sheets.Count Application.DisplayAlerts = False NB.Sheets(2).Delete Application.DisplayAlerts = True Next ActiveWindow.DisplayGridlines = False NB.SaveAs "C:" & MB.Sheets(I).Name & ".xls" NB.SendMail ", "Split files" NB.Close Next End Sub Can you help add a code here which will retain the page setup (page orientation and margins) Also, instead of sending email, is it possible to just save the emails in drafts folder? thanks in advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to copy page setup | New Users to Excel | |||
Copy Page Setup across tabs | Excel Discussion (Misc queries) | |||
copy page setup from worksheet to another within workbook | Excel Worksheet Functions | |||
Can I copy a worksheet with its page setup and print formats? | Excel Discussion (Misc queries) | |||
How do I copy page setup from one worksheet & paste into new shee. | Excel Discussion (Misc queries) |