Help Editing Macro Code

tcnt9176

Board Regular
Joined
Jun 23, 2008
Messages
223
I have some lengthy macros that I have to edit and test. After adding certain commands i.e. sorting, excel says that this will end the playing of the macro and I have to start over but I really need to test from the middle of the macro so I hit F8 & drag the arrow to where I want it to start which takes a few minutes b/c the macro is so long. Is there any way to make this quicker where I don't have to drag the arrow all the way down to start the macro at a certain point.
Thanks, Chris
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

war4peace

New Member
Joined
Mar 13, 2009
Messages
21
You may want to split the macro into functions and just run the appropriate function. Or you could copy/paste the relevant code into a different sub and just run that sub.
 

tcnt9176

Board Regular
Joined
Jun 23, 2008
Messages
223
So there's no way to have the play button skip to a bookmark or breakpoint?
 

war4peace

New Member
Joined
Mar 13, 2009
Messages
21
There is. Start the macro by pressing F8, then scroll down to the statement that you wish to start with and press Ctrl+F9. Or go to Debug menu and click on Set Next Statement.
 

tcnt9176

Board Regular
Joined
Jun 23, 2008
Messages
223
Perfecto!!! I knew there had to be an easier way. This is going to save me a ton of time!!!! Thanks.:)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,193
Messages
5,594,774
Members
413,934
Latest member
austinb

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
Top