Value Property [WksRange]

Value returns or sets the cell values in the Range. Returns a variant. This is the default property.

Syntax

object.Value

object. Value = Value

Parameter

Type

Description

Value

Variant

required

Example

This example demonstrates how to select a cell, print its value, and then change its value.

'Select a cell (change last line of WksRange object example to this)

Set WksRange = Wks.Cells("A3")

 

'Print the cell value

Debug.Print WksRange.Value

 

'Change the cell value

WksRange.Value = 2

Used by: WksRange object