ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Customs views won't copy into new workbook (https://www.excelbanter.com/excel-programming/352806-customs-views-wont-copy-into-new-workbook.html)

John

Customs views won't copy into new workbook
 
I have a workbook with many worksheets, each worksheet has its own custom
views, however I use the following code to separate the worksheets into
indiviual workbooks before sending out to managers.

Dim w As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In ActiveWorkbook.Worksheets
w.Copy
With ActiveSheet.UsedRange
.Value = .Value
End With
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\Fun Exp\" & w.Name
ActiveWorkbook.Close
Next w

Is their a way of also copying the individual worksheets custom views into
the new workbook for each file?

Many thanks

John



JNW

Customs views won't copy into new workbook
 
What do you mean by 'Custom Views'? do you have hidden rows/columns? Is it
the zoom value you want to copy? etc...

"John" wrote:

I have a workbook with many worksheets, each worksheet has its own custom
views, however I use the following code to separate the worksheets into
indiviual workbooks before sending out to managers.

Dim w As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In ActiveWorkbook.Worksheets
w.Copy
With ActiveSheet.UsedRange
.Value = .Value
End With
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\Fun Exp\" & w.Name
ActiveWorkbook.Close
Next w

Is their a way of also copying the individual worksheets custom views into
the new workbook for each file?

Many thanks

John




All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com