I need to know how to use correctly the way array variable for the string type.
here is what I do to define an array of string, and then loading the data to the array, I need to know how to control the out of range error correctly in the VB6 enviroments.
dim x(100) as string
dim i as integer ' index value of the string array
Here is an example:
on error goto err_outofbound
i = i + 1
x(i) = "this is line " & i
debug.print err.description & err.number
resume ' --> want to find out
of cources, if i > 100, it will be out of bound.
However, VB6 do not like this and will not be able to "trap" the out of range error.... after that,
after that we get nasting memory access issues...
Just wondering what is the best practice of using this in VB6?
do they have some thing at beging of the code
like Option boundcheck?
just like Option Explicit --> this will force you to declair every variable used in the program