Excel 2003 VBA Automaticaly Loops

tbello

New Member
Joined
Mar 30, 2011
Messages
4
I have written a lengthy macro in Excel 2003, approximately 1,300 lines. The macro has been running without any glitches until today. It now loops to the beginning without being prompted to. If I place an "Exit Sub" a few lines before the end of the macro, it does not loop. I do have a "GoTo" within the macro that goes to the line directly above "End Sub".
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Welcome to MrExcel board...

I would suggest that you step through the macro and see where it might be failing. (goto macros click the one you need and then click on step into then use the F8 key for every line in the macro)
 
Upvote 0
Welcome to the forums!

Can you please provide the code so we can debug it?
 
Upvote 0
Not sure what happened, but I deleted a few lines and the code does not loop anymore - very odd. I am written alot of code but have never seen that.
 
Upvote 0

Forum statistics

Threads
1,214,548
Messages
6,120,146
Members
448,948
Latest member
spamiki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top