Solved

VB function that accepts an array of unknown length

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

786 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