vba step into code

Noz2k

Well-known Member
Joined
Mar 15, 2011
Messages
693
Is there a way to step into the procedure at a certain point, or alternatively to skip to the end of a loop.

It's really frustrating having to go through certain loops (ones which go through over 100 times) just to get to the bit of code I'm interested in seeing.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You can set breakpoints ( click at left of code so as to turn row maroon ), or just select the row of code you want to examine and choose Run To Cursor ( Ctrl+F8 ).
 
Upvote 0
you can add some code to step into..
for example I have 50 times loops and I want only to know the value between 25 and 30 I will add condition.
Code:
...
for i=2 to 50
while (i >= 25 and i <= 30) ' condition to perform only between 25 to 30
[I]...do your code[/I]
wend
next i
 
Upvote 0
you can add some code to step into..
for example I have 50 times loops and I want only to know the value between 25 and 30 I will add condition.
Code:
...
for i=2 to 50
while (i >= 25 and i <= 30) ' condition to perform only between 25 to 30
[I]...do your code[/I]
wend
next i[/QUOTE]I would never do that when you can add watches to trigger under any specific condition. ( Debug Add Watch, or right click any variable or calculation and choose Add Watch ... you can set a clause like i=30 and choose to break when clause is True )
 
Upvote 0

Forum statistics

Threads
1,224,604
Messages
6,179,857
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top