Skip to main content

Range.EntireColumn property

Table of contents
  1. Syntax
  2. Example

Returns a Range object that represents the entire column (or columns) that contains the specified range. Read-only.

Syntax

expression.EntireColumn

expression A variable that represents a Range object.

Example

The following example sets the value of the first cell in the column that contains the active cell. The example must be run from a worksheet.

ActiveCell.EntireColumn.Cells(1, 1).Value = 5

The following example unhides all columns.

Columns.EntireColumn.Hidden = False

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>