ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   resetting worksheet properties (https://www.excelbanter.com/excel-programming/271705-resetting-worksheet-properties.html)

Michael J. Malinsky

resetting worksheet properties
 
I have a macro which contains commands that alter a worksheet's appearance
(row height, column width, borders, color, etc.). Is there a function I can
use in a macro that will reset all of these properties (to the default
worksheet properties used on a blank worksheet) or do I have to each
separately.

TIA
Mike

--
Michael J. Malinsky




Tom Ogilvy

resetting worksheet properties
 
how about

Worksheets("Blank").cells.copy
Activesheet.Cells.PasteSpecial xlFormats


given you have a sheet named blank that has the default formats.

This won't fix column widths or row heights or unmerge cells, but:

Cells.Style="Normal"

Regards,
Tom Ogilvy


"Michael J. Malinsky" wrote in message
...
I have a macro which contains commands that alter a worksheet's appearance
(row height, column width, borders, color, etc.). Is there a function I

can
use in a macro that will reset all of these properties (to the default
worksheet properties used on a blank worksheet) or do I have to each
separately.

TIA
Mike

--
Michael J. Malinsky







All times are GMT +1. The time now is 10:55 PM.

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