Columns [WksDocument]

 

The Columns method returns a WksRange object containing one or more entire columns of cells.

 

Syntax

object.Columns( Col1, Col2 )

 

Parameter

Type

Description

Col1

Variant

required; first column, column A equals 1

Col2

Variant

optional; last column

 

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 = mvColorGreen

 

Used by: WksDocument object