Subscript out of range error problem 
Author Message
 Subscript out of range error problem

First let me warn you that I'm fairly new to VB so please have a little
patience for my ignorance.

I've determined that the error is probably caused by my timer function:

I'm displaying a control array of 16 labels (in different formats (4
rows by 4 columns at a time, 3 rows by 3 columns and 2 X 2).  (using an
array for PositionX and an array for PositionY) on top of an imagebox
using ZOrder and cycling any remaining labels in the same formation
after a delay of about 2 seconds.  After label(15) is displayed the
rotation begins again unless interrupted by a mousedown event in a
specific (X,Y) position which resets the display to the original 4 X 4
formation to display all 16 labels using their assigned .left and top

A mousedown event in another position begins the sequencing of the
selected format.

Using "Step In" everything works as it should, resetting the values for
the original format and the appropriate PositionX and PositionY for each
of those labels but suddenly the execution jumps to the "Loop" part of
my delay for one more "DoEvents".  At this point my variables for the
arrays PositionX and position are reset again to what they were prior to
the interruption so when the label attempts to display in column 4 there
is no value because the format prior (say 3X3 had only values for 3

So I guess I need suggestions on how change my delay do nothing for
those 2 seconds.  This is my current code for the delay.

StopTime = Timer + 2
                Do While Timer < StopTime
FYI  I do have a provision to Erase PositionX and PositionY prior to
storing the new values.  DisplayGrid does nothing other than exit the
module and return to update the screen.  

Thanks for any suggestions on how to handle this.


Wed, 22 Mar 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Problems With FlexGrid And Subscript Out Of Range Error

2. Subscript out of range error

3. Subscript out of range error

4. Subscript out of range error

5. AddShapeRecordDetected Error: Subscript out of range

6. Defining an array and getting Subscript Out of Range Error

7. help with subscript out of range error

8. runtime error 9, subscript out of range

9. Subscript out of range (Error 9)

10. Redim causes Subscript Out of Range (Error 9)

11. Out of subscript range error!

12. Help! Error # 9 - Subscript out of range


Powered by phpBB® Forum Software