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