Solved

VB function that accepts an array of unknown length

Posted on 2014-03-28
5
197 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now