ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   For Don Guiilet,please help, 1004 error,1003 (type mismatch etc et (https://www.excelbanter.com/excel-programming/416674-don-guiilet-please-help-1004-error-1003-type-mismatch-etc-et.html)

BEETAL

For Don Guiilet,please help, 1004 error,1003 (type mismatch etc et
 
Option explicit
Option Base 1
Sub mmatrixmulttest()
Dim q, ran, t, X As Double
Dim Randommat() As Variant
Dim CMAT() As Variant
CMAT = Application.Range("VC")
X = UBound(CMAT, 1)
Dim matrixinter() As Variant
Dim matrixinter2() As Variant
ReDim matrixinter(X, X)
ReDim matrixinter2(X, X)
ReDim CMAT(X, X)
ReDim Randommat(1, X)
For q = 1 To X
ran = Application.WorksheetFunction.NormSInv(Rnd())
Randommat(1, q) = ran * t
Next q
Dim Rmattranspose() As Variant
ReDim Rmattranspose(X, 1)
Rmattranspose = Application.WorksheetFunction.Transpose(Randommat)
With Application
matrixinter = .MMULT(Rmattranspose, CMAT)
matrixinter2 = .MMULT(CMAT, CMAT)' this multiplication also does not
'work.Typemismatch is the error. CMAT is a square matrixThere should be no
'problem.
End With
End Sub


THE VBE does not show MMult application funtion. Why I get MMULT not MMult
in my VBE.

beetal
--
beetal


All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com