Originally Posted by
SamT
@All; is there an easy way to save the hidden Properties and sizes of all the Rows and Columns in Excel => 2007? The OP will need to have the book returned to the original appearance after all the work is done.
Perhaps something along these lines in a separate workbook:
Sub blah()
Set NewSht = Sheets.Add
NewSht.Cells(1, 1).Resize(7).Value = Application.Transpose(Array("Name", "Used Range", "Columns Hidden", "Column Widths", "Rows Hidden", "Row Heights", "Sheet Visible Property"))
Set xxx = Workbooks("vbaxpress54022SagaSheet 1.4.9 CHARACTER GENERATOR.xlsm")
With NewSht
DestColm = 2
For Each sht In xxx.Sheets
.Cells(1, DestColm) = sht.Name
.Cells(2, DestColm) = sht.UsedRange.Address(0, 0)
cw = "": ch = ""
For Each colm In sht.UsedRange.Columns
ch = ch & ", " & colm.Hidden
cw = cw & ", " & colm.Width
Next colm
.Cells(3, DestColm).Value = Mid(ch, 3)
.Cells(4, DestColm).Value = Mid(cw, 3)
rhd = "": rht = ""
For Each rw In sht.UsedRange.Rows
rhd = rhd & ", " & rw.Hidden
rht = rht & ", " & rw.Height
If Len(rht) > 32768 Then Exit For
Next rw
.Cells(5, DestColm).Value = Mid(rhd, 3)
.Cells(6, DestColm).Value = Mid(rht, 3)
.Cells(7, DestColm).Value = sht.Visible
DestColm = DestColm + 1
Next sht
End With
End Sub
It takes some time to run as the Languages sheet has a usedrange of A1:IU65536 (edit post posting - rectified), but it shouldn't be too difficult to convert the strings in some of these cells to arrays to restore the original sheets' appearance.
Will also need to know what this sheet does, and what's Star Wars?