XLEAccessGuru
XLEGuru
- Local time
- Today, 02:23
- Joined
- Nov 17, 2006
- Messages
- 65
I've finally begun to understand arrays but am still only 1 day old with them. I got one to work in my code, but have a couple questions I hope you VBA buffs can help me with.
1. The MSDN website has a help page discussing a Binary Search Function for arrays that is similar to the array text search here:
----> http://http://msdn2.microsoft.com/en-us/library/aa164795(office.10).aspx
However, they offer no example. Does anyone have an example of the binary search or a similar function that searches numeric arrays for a specific number (or numbers)?
2. MSDN does have an example of the string array search function (http://msdn2.microsoft.com/en-us/library/aa164799(office.10).aspx) but silly me can't seem to get it to work right. Can someone offer an example of how this works with an array?
3. How can I see all of the values in my array after I create it either in a text box or in the immediate window (I want to check that it is working right)? I tried this:
but it doesn't work . I get a "Subscript out of Range" error.
Any help is much appreciated!
1. The MSDN website has a help page discussing a Binary Search Function for arrays that is similar to the array text search here:
----> http://http://msdn2.microsoft.com/en-us/library/aa164795(office.10).aspx
However, they offer no example. Does anyone have an example of the binary search or a similar function that searches numeric arrays for a specific number (or numbers)?
2. MSDN does have an example of the string array search function (http://msdn2.microsoft.com/en-us/library/aa164799(office.10).aspx) but silly me can't seem to get it to work right. Can someone offer an example of how this works with an array?
3. How can I see all of the values in my array after I create it either in a text box or in the immediate window (I want to check that it is working right)? I tried this:
Code:
Debug.Print MyArray(i)
but it doesn't work . I get a "Subscript out of Range" error.
Any help is much appreciated!