ADJ
Civil/Environmental
- Oct 17, 2001
- 3
I would like to know how could I get a solution to solve a matrix from VB using a Excel command.
For exemple, I try to solve a determinant:
1 2
3 4 = -2
Dim obj As Excel.Application
Set obj = CreateObject("Excel.Application"
Solution = obj.Application.MDeterm(1,2;3,4)
But VB doesn't allow me to write the ";"
It is very similar if I try to solve a Inverse Matrix:
Solution = obj.Application.MInverse(1,2;3,4)
Or if I try with a variable:
A(1,1)=1 : A(1,2)=2 : A(2,1)=3 : A(2,2)=4
Solution = obj.Application.MDeterm(A())
it gaves to me Solution = 0
Thanks a lot & sorry for my english!
For exemple, I try to solve a determinant:
1 2
3 4 = -2
Dim obj As Excel.Application
Set obj = CreateObject("Excel.Application"
Solution = obj.Application.MDeterm(1,2;3,4)
But VB doesn't allow me to write the ";"
It is very similar if I try to solve a Inverse Matrix:
Solution = obj.Application.MInverse(1,2;3,4)
Or if I try with a variable:
A(1,1)=1 : A(1,2)=2 : A(2,1)=3 : A(2,2)=4
Solution = obj.Application.MDeterm(A())
it gaves to me Solution = 0
Thanks a lot & sorry for my english!