ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Maintaining Column Widths When Copying (https://www.excelbanter.com/excel-programming/350143-maintaining-column-widths-when-copying.html)

Lilbit

Maintaining Column Widths When Copying
 
I have a macro, which copies the worksheets from a master workbook to a new
workbook. However, while the page setup copies over just fine, the column
widths do not. I want the column widths to remain the same regardless of
what I copy to the worksheets. Please help!! Thanks!!!


Gary L Brown

Maintaining Column Widths When Copying
 
Copy the worksheet not just the cells.

Application.ActiveSheet.Copy _
Befo=Workbooks(myFirstWorkbook).Sheets(1)

--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"Lilbit" wrote:

I have a macro, which copies the worksheets from a master workbook to a new
workbook. However, while the page setup copies over just fine, the column
widths do not. I want the column widths to remain the same regardless of
what I copy to the worksheets. Please help!! Thanks!!!




All times are GMT +1. The time now is 08:26 AM.

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