none
Determining column width in an Excel Macro RRS feed

  • Question

  • Hi,

    I am trying to determine the current width of a column.  I have tried the following with no success.  Any help appreciated.

    Sub Macro2()


    Dim ColumnWidth As Long
    Dim i As Integer

    ColumnWidth = Round(Columns("L:L").ColumnWidth)

    ColumnWidth = Columns(L).ColumnWidth

    ColumnWidth = Range("L:L").Width

    Columns("L:L").Select
    ColumnWidth = Selection.ColumnWidth

        
        For i = ColumnWidth To 1
            ColumnWidth = ColumnWidth - 1
        Next i

        Columns("R:R").Hidden = True
        
    End Sub

    Thursday, October 15, 2015 10:38 AM

Answers

All replies