VBA Change Format of All Cells in a Workbook
As others have pointed out, Cells is better to use than my
Range("1:"&WS.Rows.Count).
--
Rick (MVP - Excel)
"Rick Rothstein" wrote in message
...
This should do it
Sub ChangeWorkbookFormat()
Dim WS As Worksheet
For Each WS In Worksheets
WS.Range("1:" & WS.Rows.Count).NumberFormat = "General"
Next
End Sub
Use "@" instead of "General" if you want the Text format.
--
Rick (MVP - Excel)
wrote in message
...
With VBA I would like to change the format of all cells in all
worksheets of a workbook to 'General' or 'Text'. How can this be
done? Thanks.
|