I would like to set the column width for one column across most of sheets in my workbook.
The code looks like this:
Sub width()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name = "NAD SHEET" Or ws.Name = "BoM" Or ws.Name = "BoQ" Or ws.Name = "Sign Off Sheet"
Or ws.Name = "PIANOI" Then
'do nothing
Else
ws.Range("M").ColumnWidth = 12.67
End If
Next ws
End Sub
I am getting an error:
Compile error: Expected: #
I tried also
With
ws.Range("M").ColumnWidth = 12.67
End With
as well as
ws.Range("M1:M").ColumnWidth = 12.67
still the same.
I don't know what is going on really here.
