Columns [WksDocument]
Columns returns a range object containing one or more entire columns of cells. Returns a WksRange object.
Syntax
object.Columns( Col1, Col2 )
Parameter |
Type |
Default |
Description |
Col1 |
Variant |
required; This provides the first column of the range. The range may have a single column. |
|
Col2 |
Variant |
optional; This provides the last column of the range. |
Remarks
See Specifying Cell Coordinates for more information on selecting cells.
Example
This example demonstrates how to change the cell color to green in columns A through C.
Wks.Columns(Col1:=1, Col2:=3).Format.BackColor = srfColorGreen
Used by: WksDocument object