LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default MMult and MInv

Hi there,

Im trying to work out how to use MMult function in the VBA (i dont want
input or output in excel worksheet). But it keeps giving me a runtime
error 1004: "Unable to get the MMult property of the WorksheetFunction
class" on the MMult line.

The funny thing is when i tried changing the array2 into the exact same
dimensions, 2 by 2, it works... this i dont understand, i thought as
long as you have the same number columns in array 1 with the same
number of rows in array 2 it should work.

I really need to have array1 and thus array1inv in 2 by 2, where as
array 2 in 1 by 2.

here is the sub i was working on

Sub test()

Dim array1(1 To 2, 1 To 2) As Single
Dim array1inv
Dim array2(1 To 2) As Single
Dim arrayresult

array1(1, 1) = 0.5
array1(1, 2) = 0.8
array1(2, 1) = 2
array1(2, 2) = 1.2

array2(1) = -5000
array2(2) = -8000

array1inv = Application.WorksheetFunction.MInverse(array1())
arrayresult = Application.WorksheetFunction.MMult(array1inv, array2)

End Sub

ANy help will be much appreciated!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - MMULT al Excel Discussion (Misc queries) 3 June 29th 10 06:57 AM
MMULT Dave F Excel Worksheet Functions 1 August 10th 06 02:37 PM
MMULt Worksheet Function TC8 Excel Worksheet Functions 2 April 26th 06 01:53 PM
MMULT( ) Bill Martin[_2_] Excel Programming 0 April 12th 06 08:30 PM
Limits of MINV matrix function KJ Excel Worksheet Functions 2 September 16th 05 09:06 AM


All times are GMT +1. The time now is 08:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"