labsnark 0 Newbie Poster

Hi again

I've acquired a strange effect in the program that I'm writing to drill balls with holes at various angles over the surface.
The code reads in data from a text file that is read into a number of public variables. These values are then read back when the 'drill' button is pressed, which is where the problems have started. After it worked for a while with no problems, I added some more code, which worked until I later removed it (and nothing else). Now, it works its way through the variables but freezes ('(not responding)') at random points in the process. BUT THEN, it then comes up with feedback on the form that makes it look like it's read the file as it should, but not reported what was happening on the screen as it should.
I'm climbing the walls with this now - does anyone have any suggestions as to what might be happening? The relevant bit of code is below, but I'm not convinced its that that's causing this, because there is no consistency in when it happens.

Thanks, Gavin

For a = 1 To m
           Label5.Text = atomname(a) : Label5.Refresh()

      For drillno = 1 To atomrun(a)
         Label7.Text = "Ball number " & drillno & " of " & atomrun(a) 
     :  Label7.Refresh()

           Label12.Text = "Drilling initial hole and rodding with " & atombondlength(a) & "cm rods" : Label12.Refresh()

         For b = 0 To atombonds(a)

           Label4.Text = "Moving Theta to " & atom(a, b, 0) : Label4.Refresh()
           Label9.Text = "Moving Phi to " & atom(a, b, 1) : Label9.Refresh()

                    Label8.Text = "moving" : Label8.Refresh()                   
                    Label8.Text = "Drilling" : Label8.Refresh()
          Next
      Next
    Next