Excel Macro to Close Active Excel Workbook RRS feed

  • Question

  • Hello and good morning, everyone!

    I have a VBasic script that takes a sheet from the active Excel workbook and saves it as a CSV. This works fine, but I'm trying to automate the process and the step I'm tackling at the moment is how to close the Excel workbook after the CSV is saved.

    My gut tells me that this isn't possible, because the active book contains the code telling itself to close, but I fully admit that I may be off a bit - or, a mile, give or take a light year or so.

    So, is there any way to include in the VBasic script a command to close the active workbook?

    Oh, if this isn't the right forum, please move it to where it belongs.


    • Moved by KareninstructorMVP Wednesday, January 10, 2018 12:46 AM Moved from vb.net forum
    Tuesday, January 9, 2018 4:24 PM


All replies