Private Statement

Call Statement,Class Statement,Const Statement,Dim Statement,Do...Loop Statement,Erase Statement,Execute Statement,ExecuteGlobal Statement,Exit Statement,For...Next Statement,Function Statement,If...Then...Else Statement,On Error Statement,Option Explicit Statement,Private Statement,Property Get Statement,Property Let Statement,Property Set Statement,Public Statement,Randomize Statement,ReDim Statement,Rem Statement,Select Case Statement,Set Statement,Sub Statement,While...Wend Statement,With Statement Home home | Other Resources other resources | Advertise with us advertise | Link to us link to us | Contact us contact | Bookmark Us!
Google
 
Where can I find good Windows Web Hosting to host my VBScript Site?
You can find good Windows Hosting which support VBScript, ASP, ASP.Net,VisualStudio.Net and MSSQL at a very reasonable low monthly fee at EasyCGI.com and DiscountASP.Net

Private Statement

Declares private variables and allocates storage space. Declares, in a Class block, a private variable.

Private varname[([subscripts])][, varname[([subscripts])]] . . .

Arguments

varname

Name of the variable ; follows standard variable naming conventions.

subscripts

Dimensions of an array variable; up to 60 multiple dimensions may be declared. The subscripts argument uses the following syntax:

upper [, upper] . . .

The lower bound of an array is always zero.

Remarks

Private statement variables are available only to the script in which they are declared.

A variable that refers to an object must be assigned an existing object using the Set statement before it can be used. Until it is assigned an object, the declared object variable is initialized as Empty.

You can also use the Private statement with empty parentheses to declare a dynamic array. After declaring a dynamic array, use the ReDim statement within a procedure to define the number of dimensions and elements in the array. If you try to redeclare a dimension for an array variable whose size was explicitly specified in a Private, Public, or Dim statement, an error occurs.

Note   When you use the Private statement in a procedure, you generally put the Private statement at the beginning of the procedure.

The following example illustrates use of the Private statement.

Private MyNumber   ' Private Variant variable.
Private MyArray(9)   ' Private array variable.
   ' Multiple Private declarations of Variant variables.
Private MyNumber, MyVar, YourNumber

VBScriptOnline.com - Call Statement,Class Statement,Const Statement,Dim Statement,Do...Loop Statement,Erase Statement,Execute Statement,ExecuteGlobal Statement,Exit Statement,For...Next Statement,Function Statement,If...Then...Else Statement,On Error Statement,Option Explicit Statement,Private Statement,Property Get Statement,Property Let Statement,Property Set Statement,Public Statement,Randomize Statement,ReDim Statement,Rem Statement,Select Case Statement,Set Statement,Sub Statement,While...Wend Statement,With Statement