Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

VB function that accepts an array of unknown length

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
dma70
Asked:
dma70
  • 3
  • 2
1 Solution
 
ste5anSenior DeveloperCommented:
0
 
dma70Author Commented:
Thank you that is very useful.   What did you use to find this?
0
 
dma70Author Commented:
ste5an:   I just tried one of the functions listed.  Do you know why the following gives me an error?:

IsArrayAllocated
0
 
ste5anSenior DeveloperCommented:
0
 
dma70Author Commented:
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now