Programming Reference Manual
 
Syntax
 
S$ = stringclassobject.Text
S$ = stringclassobject
stringclassobject = S$
stringclassobject.Text = S$
 
Description
This is the default property of the StringClass variable. Just like normal string variables, a string value can be assigned directly to the StringClass variable, or by referencing the .Value property.
 
Because of this default property, the behaviour of any StringClass variable is similar of that of a normal String variable.
 
Note: be aware where using the StringClass variable as a string parameter in a function call or method, you must use the .Value property. If you do not do this, the Basic Script interpreter will try to parse the variable as an object, instead of an string.
 
Parameter
Description
S$
The string value that is assigned to the StringClass variable. Erases and re-initialises then internal text buffer of the variable.
See Also
Example
 
Sub Main
 
Dim Str1 As String
Dim Str2 As StringClass
 
Set Str2 = New StringClass
 
Str1 = "Hello, world!"
Str2 = "Hello, world!"
 
Debug.Print Left$(Str1,5) 'Hello
Debug.Print Left$(Str2,5) 'Hello
 
End Sub