VB6Runtime / Library / String / rset_statement

VB6 Library Reference

RSet Statement

Right-aligns a string within a string variable or copies one user-defined variable to another.

Syntax

RSet stringvar = string
RSet varname1 = varname2  ' For user-defined types

Parts

Remarks

Example

Dim MyString As String * 10
MyString = String(10, "X")  ' Fill with X's
RSet MyString = "VB6"       ' Result: "       VB6"

Example with User-Defined Types

Type TypeA
    Name As String * 20
    Age As Integer
End Type
Type TypeB
    Data As String * 22
End Type
Dim VarA As TypeA
Dim VarB As TypeB
VarA.Name = "John"
VarA.Age = 30
RSet VarB = VarA  ' Copy VarA to VarB byte-by-byte

See Also

References

← Back to String | View all statements