Re: code loops 1024 times not what i ask

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi thanks for your responses guys.

I have tried to add the msgbox and it does display the correct number.

The code i am using selects all then copies the selection and I was
including this in my loop!

Now moved it works as it should.

Thanks again

Rob



"Rob Hargreaves" <nrgsav@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:42f5dc50_4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi
>
> I wonder if someone can help, I am trying to repeat some code 200 times
> can you tell me where I am going wrong in my loop.
>
> (It is doing 1024 times!)
>
> Sub test()
> Dim x As Integer
>
> Do Until x = 200
> 'code to repeat
> x = x + 1
> Loop
>
> End Sub
>
> thanks for your help.
>
> Rob
>
>
>



.


Quantcast