Yes! That's it!

Thanks a lot!

Okay...I have corrected the code using a global array.

The code has even become a bit shorter...

The application is running now and the displayed values are right.

I post the correction here.....(perhaps somebody has a similar problem...)

code:
"

(I have found another fault..I had left the brackets empty)
...
// I define some function prototypes
function TestLoop(var NewListBoxID);
...


(My main fault..the array is global now)
...
// That's the pointer array for storing the pointers of
// created ListBoxes
LISTBOX ListBoxArray[100];
...

...
// This is the most important function, I think.....
function NewListBox()
{

// Increase the amount of ListBoxes
ListBoxCount += 1;

// ---> The ListBoxArray[100] is a global array of 100 "ListBox"-pointers.
// ---> I set the properties of the global array to the default values...
// This way I will be able to access this new "ListBox" later through the array!
ListBoxArray[ListBoxCount].Active = 100;

// Return the ID of the new ListBox
return(ListBoxCount);

}
...


"