Pause or stop VBA for a manual edit to the sheet

Javi

Active Member
Joined
May 26, 2011
Messages
440
Hi All,

I have a sheet with approximately 75K rows. My code is adding columns, formulas and formatting working great. I would like to stop the code in the middle/at specific points with a message box to allow me to do a manual edit on the sheet. For instance, have a message box pop up with the message of what edit to perform (This will be predetermined not any type of calculation) and a continue button that will allow the code to continue after I finished my manual edit.

I seem to recall we can have the sheet active behind the message box so the message box would still be there as I am performing the manual edit. Once the manual edit is completed I could click continue and the code will continue or start/call a second macro.


Thank you, any advice or input would be appreciated.
 
Thank you everyone for all of the input and discussion on this topic. I use the Userform method. I separated my original code into several codes where I wanted the code to stop/pause. In the properties of the Userform I set “Show modal = False “ allowing me to edit the sheet with the Userform still open. The continue button on the Userform simply called the rest of the code.

FYI - the reason why I needed to stop/pause the code was my sheet ended up with 200K rows and I needed to delete out approximately hundred 190K based on a cell value. For some reason the code took too long to validate each row and delete, so I did it manually. The code took 20 minutes to delete the lines and manually it took about two minutes.

Below are the 2 delete row codes I tried.





Thanks again.

This would probably have solved the problem.

Code:
Sub t()
    With ActiveSheet.UsedRange
        .AutoFilter 13, ">1"
        .SpecialCells(xlCellTypeVisible).EntireRow.Delete
    End With
    ActiveSheet.AutoFilterMode = False
End Sub
 
Last edited:
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,905
Messages
6,175,297
Members
452,633
Latest member
DougMo

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