Results 1 to 10 of 10

Halt automation until files are saved and closed by user.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Halt automation until files are saved and closed by user.

    Hello everyone. I have a series of Yes/No message boxes which pop up during an automation. The message boxes ask whether several files need to be updated. If the user selects yes, the file is Open. I need to correct the code so that the other submacros in the automation are halted, untill the selected files are closed (and saved at closing) by the user. After closing the file, the automation will then continue. Please see the code below for an example.

    Sub Update_QA()
        Dim sPath1      As String
        Const sFileInp1 As String = "QA.xlsm"
        Dim YesNO_QA    As String
        Dim Question    As String
        Dim wb1         As Workbook
        
        sPath1 = fPath & fDate & "_157\" & "Support_Summaries\"
        
        Question = "Do You Need to Update THE QA File?"
        
        YesNO_QA = MsgBox(Question, vbQuestion + vbYesNo, "???")
    
        If YesNO_QA = vbNo Then
            MsgBox "Ok"
        Else
            Set wb1 = Workbooks.Open(sPath1 & sFileInp1)
        End If
    
    End Sub
    There are only 8 submacros in the automation.
    Last edited by AnthonyWB; 05-03-2010 at 04:25 PM. Reason: Corrections

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1