O'Reilly logo

VBScript in a Nutshell by Ron Petrusha, Paul Lomax, Matt Childs

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Property Let Statement

Syntax

[Public | Private Property Let name ([arglist,] value)
   [statements]
   [Exit Property] 
   [statements]
End Property
Public

Use: Optional

Type: Keyword

Makes the property visible outside of the class, giving it scope through all procedures in all scripts. Public and Private are mutually exclusive.

Private

Use: Optional

Type: Keyword

Restricts the scope of the property to those procedures within the same Class...End Class code block. Private and Public are mutually exclusive.

name

Use: Required

The name of the property.

arglist

Use: Optional

Data Subtype: Any

A comma-delimited list of variables to be passed to the property as arguments from the calling procedure.

value

Use: Required

Data Subtype: Any

The last (or only) argument in arglist; a variable containing the value to be assigned to the property.

statements

Use: Optional

Program code to be executed within the property.

arglist uses the following syntax:
[ByVal | ByRef] varname[( )]
ByVal

Use: Optional

Type: Keyword

The argument is passed by value; that is, a local copy of the variable is assigned the value of the argument.

ByRef

Use: Optional

Type: Keyword

The argument is passed by reference; that is, the local variable is simply a reference to the argument being passed. All changes made to the local variable are reflected in the calling argument when control returns to the calling procedure. ByRef is the default method of passing variables.

varname

Use: Required

The name of the local variable containing either the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required