I'd like to know if anyone has a function in Access VBA that accomplishes a similar goal to the challenge presented here:
http://www.mrexcel.com/pc09.shtml
Essentially I would like to have a function that will find which values in an array of values would add up to a set amount. So if I passed the function an array with {1, 2, 4, 6} and I wanted to know which of the values in that array added up to 10, the function would return and array with {4, 6}. The solution posted in the link above is intended for Excel and is based on a range of values, but I would like something similar in Access VBA that is based on an array rather than an Excel range. Is that possible?
-benjicat
http://www.mrexcel.com/pc09.shtml
Essentially I would like to have a function that will find which values in an array of values would add up to a set amount. So if I passed the function an array with {1, 2, 4, 6} and I wanted to know which of the values in that array added up to 10, the function would return and array with {4, 6}. The solution posted in the link above is intended for Excel and is based on a range of values, but I would like something similar in Access VBA that is based on an array rather than an Excel range. Is that possible?
-benjicat