none
Code to find out VBA stopped on Breakpoint at runtime RRS feed

  • Question

  • Hi,

      I am having requirement mentioned as below.

      I have VBA program being executed with some inserted breakpoints on VBA statements.

      I would like to find out VBA stopped on breakpoint at runtime using code snippet to do some thing special.

     Could you please let me know is there a way to find out?

     Thanks,

    Praveen V

      

      

      

    Tuesday, November 5, 2013 4:07 AM

All replies

  • What ever code you want to run you should be able to run immediately prior to the break point.

    You could either insert all the code directly before the break point or have the code in a separate sub and call the sub and pass any parameters (variables) that it needs and the break point could go at the end of the called sub.

    As a matter of interest what are you trying to achieve? I wonder if there is not a better way of doing what you require because break points are usually only used during testing of code.


    Regards, OssieMac

    Tuesday, November 5, 2013 9:43 PM
  • Hi,

      Thank you for your reply. 

      But our application is component based and some of the components are in .Net which will have access to VBA Object.

     .net application needs to get notified On VBA Breakpoint to do some thing special.

      Please let me know is there anyway to achieve this?

    Thanks,

    Praveen V

     

    Wednesday, November 6, 2013 1:00 AM
  • Hi Parveen V,

    Usually, we use Visual Basic Editor to debug the VBA project.

    A breakpoint is a marker placed on a line of code that causes execution to pause immediately before executing that line. When we run the code, execution will pause immediately in the line of code with the breakpoint and will display it in yellow background with a black font.

    I am afraid that there is no way to notify other application when the VBA project pause at the runtime.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 6, 2013 10:04 AM
    Moderator