Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Functions User Defined > COLUMNWIDTH< Previous | Next > 

 

COLUMNWIDTH([iColumnNo]) As Single

 
 

Returns the column width of the active cell.

 

 
iColumnNoThe column number you want the width of.
 

 

REMARKS

 
 
  • ??

     

     
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    Option Explicit

    Public Function COLUMNWIDTH(Optional ByVal iColumnNo As Integer = -1) As Single

       If iRowN = -1 Then
          COLUMNWIDTH = ActiveCell.ColumnWidth
       Else
          COLUMNWIDTH = ActiveSheet.Columns(iColumnNo & ":" & iColumnNo).ColumnWidth
       End If
    End Function
       

     

    Example

     


     Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.< Previous | Top | Next >