Solved

VB function that accepts an array of unknown length

Posted on 2014-03-28
5
199 Views
Last Modified: 2014-03-28
Would like a sample function that takes as its argument any array (one or two dimensions) and then gets its length (or if its two dimensional its length in both directions).  Then allows me to do some sort of calculation on it and return that value (e.g. average, sum, max min).
0
Comment
Question by:dma70
  • 3
  • 2
5 Comments
 
LVL 33

Accepted Solution

by:
ste5an earned 400 total points
ID: 39961720
0
 
LVL 1

Author Closing Comment

by:dma70
ID: 39961735
Thank you that is very useful.   What did you use to find this?
0
 
LVL 1

Author Comment

by:dma70
ID: 39961847
ste5an:   I just tried one of the functions listed.  Do you know why the following gives me an error?:

IsArrayAllocated
0
 
LVL 33

Expert Comment

by:ste5an
ID: 39962084
0
 
LVL 1

Author Comment

by:dma70
ID: 39962112
thanks -- I was able to get the function to compile when I added the huge number of functions your textbook referred to.   But the program still fails on the Array Allocation test.

Despite what you sent me - I think this is beyond my comprehension.    All I care about is that the function accepts any set of cell range as an input.   It doesn't at the moment until I understand more about what allocation means.    I am not sure why this needs to be so complicated.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question