Advertisement

06.19.2008 at 06:19AM PDT, ID: 23498697
[x]
Attachment Details

VBA to pause sub() execution, then resume when user wants it to

Asked by glennes in Microsoft Excel Spreadsheet Software, VB Script

Tags: Microsoft, Excel, 2003

At a point in the execution of a VBA script, I want execution to pause so the user can review the spreadsheet created up to that point, delete some unneeded rows if they are present, then resume execution by doing something -- maybe saying YES to an input box question, e.g., RESUME? -- , or any other similar convention. How can this be done in my VBA script?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
....
... 
 
End With
    
    With SQLXL.Sql.Statements(3)
        .ShowParametersDlg = False
        .ShowResultsetDlg = False
    End With
    SQLXL.Sql.Statements(3).Execute
 
 
THE MACRO NEEDS TO PAUSE HERE FOR USER EDITS
THEN RESUME WITH EXECUTION OF THE NEXT STATEMENTS
BELOW.
 
    
    Range("L2").Select
    ActiveCell.FormulaR1C1 = "=RC[-6]*100"
    Range("M2").Select
...
....
[+][-]06.19.2008 at 06:22AM PDT, ID: 21821840

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Excel Spreadsheet Software, VB Script
Tags: Microsoft, Excel, 2003
Sign Up Now!
Solution Provided By: rorya
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.19.2008 at 06:43AM PDT, ID: 21822031

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628