How do I create a macro to format the same column width for thousands of workbooks in a folder?
Posted on 2009-02-20
I ran a VBA macro that created new workbooks based on unique values from a specified column. It named and saved them all in one folder, which was amazing, but it didn't carry over the column width formatting from the original document. I am wondering what the best way is to achieve the end result. Is there a way to add in the column width formatting into the same VBA macro that creates the new workbooks...OR...should I do the column width formatting after running that macro on the folder full of new workbooks with a new macro?
There is another piece to the end result needed that may affect the solution for this. I also added a Header in Print Preview. Is there a way to add this to the either the "create new workbooks based on unique value" macro or a new macro that sets the column width for the few thousands of workbooks in the folder?
I attached the macro that I am using. Thanks in advance for any help with this.