well here is the part of my code
VB Code:
Private msngMouseX() As Single Private msngMouseY() As Single Private Sub xic_MouseMove( _ Index As Integer, _ Button As Integer, _ Shift As Integer, _ x As Single, _ Y As Single _ ) If (Button = vbLeftButton) Then xic(Index).Move (xic(Index).Left + x - msngMouseX(Index)), _ (xic(Index).Top + Y - msngMouseY(Index)) Else msngMouseX(Index) = x msngMouseY(Index) = Y End If End Sub
well it runs fine but at run time when i m moving instances of Xic in my workspace here and there .. after some time .. VB prompts as " run time error '9' subscript out of range " ..
and hightlights this line in yellow
msngMouseX(Index) = x
what should i do to get rid of this problem




Reply With Quote