Nuke_It_Newport
New Member
- Joined
- Nov 17, 2020
- Messages
- 47
- Office Version
- 365
- Platform
- Windows
Good morning, everyone,
I have up to 10 worksheets that are printed as a report on a weekly basis. The user selects the sheets to print from a listbox selection. The selected sheets have certain rows and columns removed and all conditional formatting is removed from the sheets. The print preview window is shown, and the user confirms or cancels the print operation. Once the print operation is complete, the rows and columns are unhidden, and the conditional formatting is reapplied.
I've been working to write code that is as efficient as possible. Which of these methods would be faster (or am I splitting hairs here)?
I have up to 10 worksheets that are printed as a report on a weekly basis. The user selects the sheets to print from a listbox selection. The selected sheets have certain rows and columns removed and all conditional formatting is removed from the sheets. The print preview window is shown, and the user confirms or cancels the print operation. Once the print operation is complete, the rows and columns are unhidden, and the conditional formatting is reapplied.
I've been working to write code that is as efficient as possible. Which of these methods would be faster (or am I splitting hairs here)?
- On the selected sheets, hide certain rows and columns, remove conditional formatting, print the sheets, then unhide the rows and columns and reapply the conditional formatting.
- Create new worksheets, copy the original worksheets to these sheets using an array (only copying the desired rows and columns as text only (no CF or other formatting), then deleting the temporary sheets after printing.