Along the same question, any idea why this doesnt this work?
Private Sub FontFix()
With UsedRange.Cells
' All unlocked cells format to Shrink To Fit
If Not Cells.Locked Then
.ShrinkToFit = True
End If
' All Non-Bold fonts or Non-Wingding fonts change to Arial Narrow.
If Not .Font.Bold = True And Not Cells.Locked And Not .Font.Name = "Wingdings" Then
.Font.Name = "Arial Narrow"
End If
' All Wingding fonts change to bold and size 18.
If .Font.Name = "Wingdings" Then
.Font.Size = 18
.Font.Bold = True
.ShrinkToFit = False
End If
End With
End Sub
I know i have something typed incorrectly because it bypasses all the IF statements as soon as it gets to them (as if each one was false).
Bookmarks