Workbook Formatting

J

jjfitts

I apologize if this has already been covered.

I would like to apply column width formatting to over 100 worksheets i
a particular workbook. Anyone have any idea on how to update al
worksheets in a workbook?

Something like this but for all sheets at once.

Sub resize()
'
' resize Macro
' Macro recorded 4/26/04 by jfitts
'
'
Columns("A:A").ColumnWidth = 5.14
Columns("B:B").Select
Selection.ColumnWidth = 5.86
Columns("C:C").Select
Selection.ColumnWidth = 21.14
Columns("F:F").Select
Selection.ColumnWidth = 25.86
Range("E:E,D:D,F1,F:F").Select
Range("F1").Activate
Columns("F:F").ColumnWidth = 12
Columns("G:G").ColumnWidth = 35.57
End Su
 
D

Don Guillett

try
sheets.select
Columns("A:A").ColumnWidth = 5.14
Columns("B:B").ColumnWidth = 5.86
Columns("C:C").ColumnWidth = 21.14
Columns("F:F").ColumnWidth = 25.86
etc
sheet1.select
End Sub
 
J

jjfitts

This seems to just work for the first sheet. Can you think of what
might be doing wrong
 
L

letmetakeyou

try this:

Sub xxx()

For i = 1 To Worksheets.Count
Worksheets(i).Activate
Columns("A:A").ColumnWidth = 5
Columns("B:B").ColumnWidth = 5
Columns("C:C").ColumnWidth = 5
Columns("D:D").ColumnWidth = 5
Columns("E:E").ColumnWidth = 5
Columns("F:F").ColumnWidth = 5
Columns("G:G").ColumnWidth = 5
Next

End Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top