Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am attempting to define a 2 dimen

Status
Not open for further replies.

Eytch

Programmer
Jan 29, 2003
60
US
I am attempting to define a 2 dimensional, variable array (in terms of size). The number of items given in response to an inputbox will determine the size. For each item I would like to enter a price and volume, compute the price per volume (perform a division) and return the coordinate pair and the result of the division. The program (a macro) would first ask the number of items and based on the number of items define a two dimensional array containing the price and weight of each item. The output will be the result of the division.
I know I will have to define the array as Variant and I have to do two for/next loops to populate it. How do I use the response to the Inputbox to dimension the array?

Thanks,
Eytch
 
hi,

First off, this forum is not a programming form. It is designed to address native features in Office application.

I'd suggest you post VBA (macro) questions in forum707.

But before we leave, why, with a worksheet available, would you go to the work of arrays and macros and a user interface for the user to enter data et al.... when it could ALL be done on a sheet using formulas -- NO MACROs REQUIRED???


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top