var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: pass values from excel worksheet to VBA array
i'm a newb here as well with excel and vba, i'm trying to do my homework which requires me to pass values from an array in excel worksheet to VBA and print it in a msg box
dim arr as variant
arr = range("A1:A6").value
but it didn't work.
the array is number(double) and the msgbox would be combination between string and number
ex:the numbers are 1,2,3,4,5,6
that's the first step of the homework the second is i have 2 list of array
year:1999 - 2002
i have to find the max profit and get the year when it occurs
i'd really appreciate any help/suggestions, oh and i did try the search function but couldn't get any relevant result.
Take of the
.Value and you should have it.
i tried that and that didn't work.
Originally Posted by
here's the code
Dim arr As Variant
arr = Range("A1:A6")
the result is Variant()
Doesn't seem to be a problem with it. What are you expecting it to return?
Edit: I just noticed you said this is homework. Homework is not our work, it's yours. Let me teach you the first and most important thing you can know if you want to succeed in your educational endeavors:
Let me google that for you
Last edited by Ax238; 09-18-09 at
o well, i'm just trying to learn. but thanks anyway. i know it's not your work but a help would be appreciated
I have helped you, but there's a sense of satisfaction figuring things out on your own and I don't want to rob you of that. The link I gave you should lead you directly to the correct answer.