COLUMNWIDTH
COLUMNWIDTH(iColumnNo)
Returns the column width of the active cell.
| iColumnNo | The column number you want the width of |
REMARKS
Public Function COLUMNWIDTH( _
Optional ByVal iColumnNo As Integer = -1) _
As Single
If iColumnNo = -1 Then
COLUMNWIDTH = ActiveCell.ColumnWidth
Else
COLUMNWIDTH = ActiveSheet.Columns(iColumnNo & ":" & iColumnNo).ColumnWidth
End If
End Function
For instructions on how to add this function to a workbook refer to the page under Inserting Functions
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext