I have several workbooks with several worksheets and each workbook contains a different number of worksheets. I am having a tough time getting the code to format for each sheet within the workbook. I am trying to change margins, make orientation to landscape, repeat top row, and either fit to one page or "best fit".
I believe I can only do formatting on an active sheet so I think I need the code to cycle through each sheet and apply the formatting. Do you have any ideas how to make this work?
The script I have tried makes the procedure either run away (only formatting the first sheet) or gives me errors with object definition ... (but I think I now have that corrected).
I believe I can only do formatting on an active sheet so I think I need the code to cycle through each sheet and apply the formatting. Do you have any ideas how to make this work?
The script I have tried makes the procedure either run away (only formatting the first sheet) or gives me errors with object definition ... (but I think I now have that corrected).