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

RE: [V8i VBA] 2 odd issues: Userform_Initialize event being triggered / Class loop not completing

$
0
0

[quote user="Barry Lothian"]I can see in the locals that when my row and column counter variables 'R' and 'C' are 19 and 7, CStr(CurrArray(0, C + 1))  is where the error occurs[/quote]

In addition to Bob's suggestions, use Debug.Assert to verify that things are as they should be.  For example...

Debug.Assert rowCount < UBound(array)

That will throw a run-time error if rowCount is equal to or larger than the array size.  It's useful to test programmer assumptions such as "Row count can never be larger than the array size."  If the assumption is correct, then Debug.Assert never fires.  Users never see it in code that works correctly.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>