ana
09-22-2012, 08:18 PM
Hi, I have written code which creates an array of 100 elements and then each element is an input matrix (Min) which the user enters into the worksheet raised to a power. I think the logic to the code is right as it keeps on calling the MMult function however I get the error 'Run-time error 1004' Unable to get the MMult property from the Worksheet Function.
Can anyone please let me know what I am doing wrong?
Dim oS(99) As Variant
Dim x As Variant
Dim power As Integer
Dim Min As Variant
power = 5 'This is the power to which I'd like the elements of the array raised to
Min = Range(Worksheets("1").Cells(3, 3), Worksheets("1").Cells(8, 8)) 'This is the matrix that the user enters into the specified worksheet range
For x = 1 To 99
oS(x) = WorksheetFunction.MMult(oS(x), Min)
Next
Thanks,
Ana x
Can anyone please let me know what I am doing wrong?
Dim oS(99) As Variant
Dim x As Variant
Dim power As Integer
Dim Min As Variant
power = 5 'This is the power to which I'd like the elements of the array raised to
Min = Range(Worksheets("1").Cells(3, 3), Worksheets("1").Cells(8, 8)) 'This is the matrix that the user enters into the specified worksheet range
For x = 1 To 99
oS(x) = WorksheetFunction.MMult(oS(x), Min)
Next
Thanks,
Ana x