• open new workbook after closing current workbook (VBA/Excel 2000)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » open new workbook after closing current workbook (VBA/Excel 2000)

    Author
    Topic
    #386215

    Is there a way to programmatically close the currently running workbook, then open another workbook and run the Auto_Open macro in it? It seems like one of the events ought to let me do this.

    Viewing 0 reply threads
    Author
    Replies
    • #669203

      If the code is NOT in the active workbook:

      Activeworkbook.Close SaveChanges:=False
      Workbooks.Open “c:datatest.xls”
      Activeworkbook.RunAutoMacros xlautoopen

    Viewing 0 reply threads
    Reply To: open new workbook after closing current workbook (VBA/Excel 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: