Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [V8i VBA] Copying listbox items to 2D array but getting wrong number of columns

$
0
0
Redim TempArray(0)

Lose that line.  The function will return a populated array.  Redimensioning it to a single dimension may confuse VBA.

Keep in mind that VBA arrays are often, but not always, 1-based (not zero-based).  When I write code I put the Option Base 0 statement at the top of each module to avoid any doubt.  When extracting details of an array, use the LBound() and UBound() functions to find where an array starts and ends.

These troublesome VBA ListBoxes have been around for a couple of decades.  I'm sure that you're not the first to have problems with them.  Search other VBA sites for hints & tips.  No doubt the Excel VBA developers have some advice.


Viewing all articles
Browse latest Browse all 7260

Latest Images

Trending Articles



Latest Images