Hi all, this is my first time here and i'm not an expert.
The problem is that i have a .dll objetc which function is to generate random matrix (m*n), m =n.
I would display the matrix in a list view but i have a problem, when i use the object appera an error message :" Value of type Double cannot be converted to 1-dimensiona array...". What mean this error message?
The code is :
"
Private Size As Double 'Holds current matrix size
Private theMagic As magicdemo.magicdemoclass 'magic object instance
Private Sub Form_Load()
'This function is called when the form is loaded.
'Creates a new magic class instance.
On Error GoTo Handle_Error
Set theMagic = New magicdemo.magicdemoclass
Size = 0
Exit Sub
Handle_Error:
MsgBox (Err.Description)
End Sub
Private Sub btnCreate_Click()
'This function is called when the Create button is pressed.
'Calls the mymagic method, and displays the magic square.
Dim y As Variant
If Size <= 0 Or theMagic Is Nothing Then Exit Sub
On Error GoTo Handle_Error
Call theMagic.mymagic(1, y, Size)
Call ShowMatrix(y)
Exit Sub
Handle_Error:
MsgBox (Err.Description)
End Sub
"
Call theMagic.mymagic(1, y, Size), this is the line of code where appear the error message, aunder "Size"
How can pass the problem?
Thanks all in advance
Amartya
P.S.
The builder to generate the .dll component is Matlab, and i'm following an example built for VB6.