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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
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)
 

MrKowz

Well-known Member
Joined
Jun 30, 2008
Messages
6,653
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Welcome to the forums!

Can you please provide the code so we can debug it?
 

tbello

New Member
Joined
Mar 30, 2011
Messages
4
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,651
Messages
5,838,571
Members
430,556
Latest member
Peachforyou

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
Top