LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Found where program stops, but can't stop it stopping !!

What do you mean by "stopping", does code break on a line of code, or does
Excel crash, etc
You say "it all happens in a second instance", looks like your code is
attempting to open workbooks in the same instance, show us your automation
code.

Difficult to comment with the information given.

Regards,
Peter T



Try and explain what you are doing,
"WhytheQ" wrote in message
...
Hello All,

I've previously asked about finding where my long program is stopping.
I've used several Debug.print lines in the code to find where this is
happening..........and it stops just after the line following 1By.....

With Application
.EnableEvents = False
.ScreenUpdating = True
.Calculation = xlCalculationManual
Debug.Print "1Bx" '++++++++
ChDir "R:\Statistics\"
Debug.Print "1By" '++++++++
.Workbooks.Open "R:
\Statistics\book" & xxx & ".xlsx", False, , , , True
Debug.Print "1Bz" '++++++++

.Calculation =
xlCalculationAutomatic
.ScreenUpdating = False
.EnableEvents = True
End With

It loops through the above about 40 times, opening different books -
it doesn't always stop when trying to open the same workbook. Since
finding the problem I've added in the methods (.EnableEvents =
False / .ScreenUpdating = True / .Calculation = xlCalculationManual)
to try to sort things out but it is still occuring.

All the above happens in a second instance of Excel.

Any help much appreciated

Regards,
Jason.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't find bug because program justs Stops !! WhytheQ Excel Programming 3 August 25th 09 04:42 PM
Excel functions not available then program stops K Excel Discussion (Misc queries) 0 August 20th 09 07:49 PM
Interrupting long calculations in Excel? Hi all, I am having a verylong calculation in Excel using VBA. Of course I know I can hit ESC orCTRL+BREAK to interrupt the VBA program. But I found due to too long runningprocess, the Excel window stop to LunaMoon Excel Discussion (Misc queries) 3 July 31st 08 04:47 PM
Interrupting long calculations in Excel? Hi all, I am having a verylong calculation in Excel using VBA. Of course I know I can hit ESC orCTRL+BREAK to interrupt the VBA program. But I found due to too long runningprocess, the Excel window stop to LunaMoon Excel Programming 3 July 31st 08 04:47 PM
VBA Stops Before competing the program ch Excel Programming 3 February 14th 06 03:25 PM


All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"