ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code hangs Excel ... Why? ... and how can i debug?? (https://www.excelbanter.com/excel-programming/320934-code-hangs-excel-why-how-can-i-debug.html)

Simon May

Code hangs Excel ... Why? ... and how can i debug??
 

I have written an Excel a VBA module that batch pulls HTML pages into excel
(thus converting them to spreadsheats). I then extract certain cells and
save them to a table in a master workbook, I then close origional html and
repeat the process.

So long as the batch size is small it runs fine. But If I attempt to
process to many pages Excel hangs. Leaving no clue as to why and Excel's CPU
usage is 0%.

At first I just thought that it was just "processing" some code and if I
waited it should be fine. each batch loop only takes 1 to 2 minutes.

How can I pinpoint when, where and why the code fails.

Thanks, Simon.

Tim Williams

Code hangs Excel ... Why? ... and how can i debug??
 
What happens if you hit Esc while excel is "hanging" ? Do you have to
force-quit excel to recover?

You could try adding debug statements or writing out progress to a log
file or worksheet as the batch runs. Ie. all the ususal approaches.

Tim


"Simon May" wrote in message
...

I have written an Excel a VBA module that batch pulls HTML pages
into excel
(thus converting them to spreadsheats). I then extract certain
cells and
save them to a table in a master workbook, I then close origional
html and
repeat the process.

So long as the batch size is small it runs fine. But If I attempt
to
process to many pages Excel hangs. Leaving no clue as to why and
Excel's CPU
usage is 0%.

At first I just thought that it was just "processing" some code and
if I
waited it should be fine. each batch loop only takes 1 to 2 minutes.

How can I pinpoint when, where and why the code fails.

Thanks, Simon.





All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com