Assign

concerns

The Assign attribute function assigns a value to the reference expression set by the Expression attribute.

 

Syntax

Assign(Value [, Index][, UserTouched])

Return value

None

Parameter

Use

Name

Type

Passing

Description

Required

Value

Variant

ByVal

The value assigned to the reference expression

Optional

Index

Long

ByVal

The index of the list to which the reference expression references

Optional

UserTouched

Boolean

ByVal

True: the value is marked as UserTouched
False: the value is not marked UserTouched

Example

Case A - Reference expression refers to a scalar variable and the reference is also scalar

Option 1:

 

Dim R As Reference

R.Expression := "TV.Stand"

R := True

 

Option 2:

 

Dim R As Reference

R.Expression := "TV.Stand"

R.Assign(True)

Case B - Reference expression refers to a list variable and the reference is scalar

 

Dim R As Reference

R.Expression := "TV.Stand"

R.Assign(True, 2)

 

Case C - Reference expression refers to a list variable and the reference is scalar, and the entire list should be filled in

 

Dim R As Reference

R.Expression := "TV.Stand"

R.Assign(List(True, False))