ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   workbook or worrksheet event procedure (https://www.excelbanter.com/excel-programming/309857-workbook-worrksheet-event-procedure.html)

R.VENKATARAMAN

workbook or worrksheet event procedure
 
When we put a code in the standard module it is possible to step by step
running the procedure to find out any bug. However in workbook or worksheet
even procedure it is not possible to debug in this way. If you click F8
nothing happens. Is there any method
for debugging a thisworkbook/worksheet event procedure.





Jan Karel Pieterse

workbook or worrksheet event procedure
 
Hi R.Venkataraman,

When we put a code in the standard module it is possible to step by step
running the procedure to find out any bug. However in workbook or worksheet
even procedure it is not possible to debug in this way. If you click F8
nothing happens. Is there any method
for debugging a thisworkbook/worksheet event procedure.


Go to the procedure in question, click in the first executable line of code
and hit F9 to insert a breakpoint. Then do something that makes the event code
fire and the VBE will halt at that line.

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com


R.VENKATARAMAN

workbook or worrksheet event procedure
 
thank ;you. I introduced a wrong statement somewhere in the beginning and
the break piint occured there. I had to rememeber to remove this statament .
Breakpoint is an excellent idea.

Jan Karel Pieterse wrote in message
...
Hi R.Venkataraman,

When we put a code in the standard module it is possible to step by step
running the procedure to find out any bug. However in workbook or

worksheet
even procedure it is not possible to debug in this way. If you click F8
nothing happens. Is there any method
for debugging a thisworkbook/worksheet event procedure.


Go to the procedure in question, click in the first executable line of

code
and hit F9 to insert a breakpoint. Then do something that makes the event

code
fire and the VBE will halt at that line.

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com





All times are GMT +1. The time now is 07:14 PM.

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