Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This code has been running for three years. All of a sudden I get "Code
execution has been interrupted" in the next line after Application.GetOpenFilename. No matter what the user chooses (a file or cancel). Is there a way to stop that without disabling the cancel selection? Thanks John ChDir "C:\Documents and Settings\Administrator\Desktop\Billing\State" StateBilledFile = Application.GetOpenFilename("Excel Files,_ *.xls),Title:=,Open a Nancy + date.xls file") ' Test if Cancel button was clicked. Select Case StateBilledFile Case Is < False Workbooks.Open (StateBilledFile) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello:
If your code has been running for 3 years and now suddenly it stops, you probably have an error in your Operating System or Excel has been corrupted. I've been down similar roads. On my last unexplained behavior, after beating my head against the wall, I finally did a system restore to an earlier state and it fixed my issue. Try running it in the debugger line by line if you haven't done that already and maybe you can get a hint. -- Rich Locus Logicwurks, LLC "John" wrote: This code has been running for three years. All of a sudden I get "Code execution has been interrupted" in the next line after Application.GetOpenFilename. No matter what the user chooses (a file or cancel). Is there a way to stop that without disabling the cancel selection? Thanks John ChDir "C:\Documents and Settings\Administrator\Desktop\Billing\State" StateBilledFile = Application.GetOpenFilename("Excel Files,_ *.xls),Title:=,Open a Nancy + date.xls file") ' Test if Cancel button was clicked. Select Case StateBilledFile Case Is < False Workbooks.Open (StateBilledFile) . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yeah, I ran it line by line. At GetOpenFilename it just says the same
thing. If I click continue the macro goes on perfectly. It's as if the getopenfilname demands an interruption before going on with a choice to continue or stop. I can't think of anything new on the computer. It's vista with normal upgrades. It looks like I will just have to tell the users this is what happens and click continue. John Rich Locus wrote: Hello: If your code has been running for 3 years and now suddenly it stops, you probably have an error in your Operating System or Excel has been corrupted. I've been down similar roads. On my last unexplained behavior, after beating my head against the wall, I finally did a system restore to an earlier state and it fixed my issue. Try running it in the debugger line by line if you haven't done that already and maybe you can get a hint. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I run the exact same code on windows 7, office 2007 the "interrupt"
doesn't occur. So something has happend to office 2003 or vista on the other computer to make this happen. Does anyone know what it could be? JOhn John wrote: This code has been running for three years. All of a sudden I get "Code execution has been interrupted" in the next line after Application.GetOpenFilename. No matter what the user chooses (a file or cancel). Is there a way to stop that without disabling the cancel selection? Thanks John ChDir "C:\Documents and Settings\Administrator\Desktop\Billing\State" StateBilledFile = Application.GetOpenFilename("Excel Files,_ *.xls),Title:=,Open a Nancy + date.xls file") ' Test if Cancel button was clicked. Select Case StateBilledFile Case Is < False Workbooks.Open (StateBilledFile) |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John:
Normal updates to systems will sometimes cause issues with code... rare, but it happens. Try looking at the Windows Event Viewer around the time it happens and see if it gives you any more information. It is for this very reason that Microsoft gives you the ability to roll back updates, and also has a system restore feature. These issues are tough to track down, but try the same program on a different Vista machine and see if it happen on another workstation. If not, then the current Vista machine may have issues. -- Rich Locus Logicwurks, LLC "John" wrote: If I run the exact same code on windows 7, office 2007 the "interrupt" doesn't occur. So something has happend to office 2003 or vista on the other computer to make this happen. Does anyone know what it could be? JOhn John wrote: This code has been running for three years. All of a sudden I get "Code execution has been interrupted" in the next line after Application.GetOpenFilename. No matter what the user chooses (a file or cancel). Is there a way to stop that without disabling the cancel selection? Thanks John ChDir "C:\Documents and Settings\Administrator\Desktop\Billing\State" StateBilledFile = Application.GetOpenFilename("Excel Files,_ *.xls),Title:=,Open a Nancy + date.xls file") ' Test if Cancel button was clicked. Select Case StateBilledFile Case Is < False Workbooks.Open (StateBilledFile) . |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Rich Locus wrote: John: Normal updates to systems will sometimes cause issues with code... rare, but it happens. Try looking at the Windows Event Viewer around the time it happens and see if it gives you any more information. It is for this very reason that Microsoft gives you the ability to roll back updates, and also has a system restore feature. These issues are tough to track down, but try the same program on a different Vista machine and see if it happen on another workstation. If not, then the current Vista machine may have issues. I went back to the machine to try a fix using on error but the thing had stopped happening. Have no idea why. I just left instructions to click "continue" if it happens again. That's good enough for me right now. I can see hours put in to find the culprit and it really doesn't matter if it doesn't screw anything up. John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code Execution Has Been Interrupted | Excel Programming | |||
Code execution has been interrupted | Excel Programming | |||
Code execution has been interrupted | Excel Programming | |||
Code Execution has been Interrupted | Excel Programming |