MATLAB: Does the the Str command not work in Visual Basic after I add MatrixVB as a reference in the project

falsematrixMatrixVBmmatrixstrstringtruevb

Why does the the Str command not work in Visual Basic after I add MatrixVB as a reference in my project?
This command is a standard Visual Basic command that works when I am not using MatrixVB. An example is shown below:
Str(1)
When I use MatrixVB, the following error is returned:
Compile Error: Invalid use of property.

Best Answer

The error message you are getting indicates an incorrect usage of the Str property of MatrixVB matrices. The Str property returns "True" if the matrix is a string matrix and "False" if the matrix is a numeric matrix.
The correct usage of the Str property is shown below:
Dim cs, ds As String
Private Sub Command1_Click()
A = strcat("This is a String")
B = randM(2, 2)
cs = A.Str
ds = B.Str
Text1.Text = cs
Text2.Text = ds
End Sub
To access the Visual Basic function the following command can be used:
VBA.Str(112)