Hi All,
I know what line is causing me trouble in this code, I just don't know how to fix it.
I am trying to autofit the entire row where data exists in column B, starting at row 6. I think this is incorrect "c.EntireRow.AutoFit", I just don't know how to reference the row of the "active cell"
Any help would be greatly appreciated.
I know what line is causing me trouble in this code, I just don't know how to fix it.
I am trying to autofit the entire row where data exists in column B, starting at row 6. I think this is incorrect "c.EntireRow.AutoFit", I just don't know how to reference the row of the "active cell"
Any help would be greatly appreciated.
VBA Code:
Sub FitDescRows()
Dim c As Range, sh1 As Worksheet
Set sh1 = Sheets("Pick List")
For Each c In sh1.Range("B6", sh1.Cells(Rows.Count, "B").End(xlUp))
If c.Value <> "" Then
c.EntireRow.AutoFit
End If
Next
End Sub