Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program won't stop
I tried to use a program that builds a telephone directory. It was built
a couple of years ago, on Vista. When I switched it over to Win 7, it works (I've stepped through it using Break commands) but it just won't stop. The area of interest is the following From...Next statements. For m= 1 to 26 (Letters in the alphabet) .... .... .... Next End End Sub For some reason it won't stop at 26 and just keeps going. Is this a Win 7 problem, or is there something else that could have happened. Jim Berglund |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program won't stop
I don't believe a simple for loop wound give yo this problem. I bet if yo eliminate all the code inside the for loop the problem will stop. Sub Test For m = 1 to 26 a = m next m msgbox("finished for Loop") End Sub I will repeat my tow tips when ever there are unexplained problems 1) Comment out all On Error statements until you isolate the problem 2) Enable trapping on ALL Errors. Go to VBA menu Tools - Options - General - Error Trapping - break on All errors -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=171606 Microsoft Office Help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program won't stop
Can you post your code that is inside the loop? Without it we can't
determine the problem exactly, thus we are left to guess the problem. Do you have anything in the loop that changes the value of m? -- Cheers, Ryan "jazzzbo" wrote: I tried to use a program that builds a telephone directory. It was built a couple of years ago, on Vista. When I switched it over to Win 7, it works (I've stepped through it using Break commands) but it just won't stop. The area of interest is the following From...Next statements. For m= 1 to 26 (Letters in the alphabet) .... .... .... Next End End Sub For some reason it won't stop at 26 and just keeps going. Is this a Win 7 problem, or is there something else that could have happened. Jim Berglund . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I stop a program on startup in xp pro | Excel Discussion (Misc queries) | |||
How can I program an Trailing stop loss? | Excel Programming | |||
how to stop program in a big loop? | Excel Programming | |||
stop a program | Excel Programming | |||
Stop a VB program from running | Excel Programming |