Serving the Quantitative Finance Community

 
User avatar
Beachcomber
Topic Author
Posts: 2
Joined: May 25th, 2004, 5:56 pm

vba question

January 21st, 2016, 8:55 pm

This doesn't seem that hard, but I can't seem to do it.I want to dimension several matrix variables named, for example, matrix1, matrix2, matrix3, etc...That is Dim matrix1() as variant, etc.but the number of matrixi variables that i need varies and is an input. I have to believe there is a way to do this.Perhaps I am not being very clear. I am passed an M x N matrix. I know neither M nor N. Because of our upload protocol, I need to pass along N M x 1 matrices to another program. I am not sure how to set up an unknown amount of matrices. Beachcomber
Last edited by Beachcomber on January 21st, 2016, 11:00 pm, edited 1 time in total.
 
User avatar
fulmerspot
Posts: 82
Joined: July 8th, 2009, 12:44 pm

vba question

January 22nd, 2016, 12:53 pm

QuoteOriginally posted by: BeachcomberThis doesn't seem that hard, but I can't seem to do it.I want to dimension several matrix variables named, for example, matrix1, matrix2, matrix3, etc...That is Dim matrix1() as variant, etc.but the number of matrixi variables that i need varies and is an input. I have to believe there is a way to do this.Perhaps I am not being very clear. I am passed an M x N matrix. I know neither M nor N. Because of our upload protocol, I need to pass along N M x 1 matrices to another program. I am not sure how to set up an unknown amount of matrices. BeachcomberCan you not just use the ReDim statement?Herr KartoffelKopf