Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,124
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm working with this code to make all worksheets of a workbook with columns A, B & C a specific size.
My question is now how do I exclude this code from acting on certain worksheets?
For example, how would I tell this code if the worksheets are named "DllBytes", "Sheet1" and "TOTALS" to skip this code from acting on it?
Thank you,
Pinaceous
I'm working with this code to make all worksheets of a workbook with columns A, B & C a specific size.
Code:
Sub ColumnPrep()
'
Dim wks As Worksheet
Application.ScreenUpdating = False
For Each wks In Worksheets
wks.Activate
Range("A:A").Activate
Selection.ColumnWidth = 8
Range("B:B").Activate
Selection.ColumnWidth = 15
Range("C:C").Activate
Selection.ColumnWidth = 35
Next wks
End Sub
My question is now how do I exclude this code from acting on certain worksheets?
For example, how would I tell this code if the worksheets are named "DllBytes", "Sheet1" and "TOTALS" to skip this code from acting on it?
Thank you,
Pinaceous