Sunday, 15 February 2015

excel vba - Is there a VBA command that causes a debug to start at that point? -



excel vba - Is there a VBA command that causes a debug to start at that point? -

the context of question using message boxes tool help me familiar quite big amount of vba macros running on collection of excel workbooks.

i inserting message boxes within code pop , tell/remind me in code. have button in these boxes take me debug of code @ point.

at moment solution perform division-by-zero if `yes' button chosen. here illustration snippet:

dim myerror double ... if msgbox("just entered function xyz(). want debug?", vbyesno + vbdefaultbutton2) = vbyes myerror = 1# / 0

it works, not elegant.

i hoping there command start vba debug mode @ point command called.

the stop command you:

if msgbox("just entered function xyz(). want debug?", vbyesno + vbdefaultbutton2) = vbyes stop

vba excel-vba

No comments:

Post a Comment