title: Visual Basic 6 Dynamic Variables
body: <p>I am doing a program using vb6 which is stored datas from mouseclick in term of coordinates. I succeeded doing the first stage which is displaying the clicked coordinates. My problem now is I need to save the coordinate in term of variables so i can call them back to use for another purpose for example to find distance between two points.</p>
  
  <p>if its just two coordinates its easier to find the distance. but when it comes to many coordinates I am stuck. I tried to do an array to stored the data inside loop</p>
  
  <pre><code> 1. InputX(ListNum, 0) = Int(x)
   2. InputY(ListNum, 1) = Int(y) 
   3. ListNum=ListNum+1
  </code></pre>
  
  <p>when I try to call for <code>InputX(2,0) = Text1.Text or Text1.Text=InputX(2,0)</code> none of them working. It seems that the data will be erased after I do a mouseclick</p>
  
  <p>Is there any way which I can set the dynamic variables which stored each my clicked coordinates such as Input1,Input2,Input3 ...InputN</p>
  
  <p>I do this in VB6. </p>