define row/column vector of matrix

Ms.Sigma

New Member
Joined
Mar 1, 2011
Messages
35
Hello all,

In user form, there are some textboxes and they display expected values derived from some other functions. After I get all these values, I need to use them to do further calculation.

For example, there are 5 textboxes, thus, there are 5 values. I need to make these 5 values to be a one row vector or one column vector. How should I define it?

Thanks a lot!!
 
Now, forget all above discussion.

The new question is:

The listbox1 of user form displays several columns and rows. Now, I need all these data of listbox1 to do further calculation. For example, there are 3 columns and 3 rows. It is a 3X3 matrix, and we call this matrix M. Now, I am going to write a new function, and M is needed for this new function. Such as:

Function calculation(M,P)

dim p as variant
dim M

M=listbox1.list()

(definition of p is omitted here)

End Function

I think my definition of M is wrong. What is the correct way to refer the values of listbox?
 
Upvote 0

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Not quite sure what your trying to do , But this Commandbutton code passes the "Listbox1.list" to the function Calculation, Which returns the Sum of the ListBox values.

Code:
Private Sub CommandButton3_Click()
MsgBox Calculation(ListBox1.List)
End Sub
Code:
Function Calculation(M As Variant) as integer
Calculation = Application.sum(M)
End Function
Mick
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top