Prev: Text Formats
Next: Userform ComboBox Row Source
From: John on 25 May 2010 15:26 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)
From: Rich Locus on 27 May 2010 17:58 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) > . >
From: John on 27 May 2010 21:18 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
|
Pages: 1 Prev: Text Formats Next: Userform ComboBox Row Source |