excel - User-Defined Type Not Defined error in function to multiply two matrices -



excel - User-Defined Type Not Defined error in function to multiply two matrices -

i want create function receives 2 arguments create matrix operations. want following:

li(3,5)

then:

[1 , 3 , 5 ] * [1 3 5]

so result 35. see, add together value of 1 matrix, multiply transpose.

my code next receive message "user-defined type not defined error"

public function li(a float, b float) variant dim mat(1 1, 1 3) variant dim re variant mat(1, 1) = 1 mat(1, 2) = mat(1, 3) = b re = worksheetfunction.mmult(mat, worksheetfunction.transpose(mat)) li = re end function

i utilize excel 2007.

so, what's wrong code?

there no built-in type float in vba. single precision floating point numbers utilize single, double precision floating point numbers utilize double.

excel vba function excel-vba matrix

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -