+ Reply to Thread
Results 1 to 3 of 3

Save an excel file in vbscript without user prompt

  1. #1

    Save an excel file in vbscript without user prompt

    Hi, I am trying to edit an excel spreadsheet and then close it using
    vbscript.

    the script currently edits the data fine, but when it closes, it gives
    the Save prompt. Is there a way to close the spreadsheet saving the new
    data automatically without any user input

    Thanks


  2. #2
    Steve Yandl
    Guest

    Re: Save an excel file in vbscript without user prompt

    At the start of your script, place the line

    Const xlSaveChanges = 1

    Assuming the workbook object you've created is named objWorkbook and the
    application object is named objExcel, finish your script with

    objWorkbook.Close xlSaveChanges
    objExcel.Quit

    Steve


    <[email protected]> wrote in message
    news:[email protected]...
    > Hi, I am trying to edit an excel spreadsheet and then close it using
    > vbscript.
    >
    > the script currently edits the data fine, but when it closes, it gives
    > the Save prompt. Is there a way to close the spreadsheet saving the new
    > data automatically without any user input
    >
    > Thanks
    >




  3. #3

    Re: Save an excel file in vbscript without user prompt

    Thanks very much


+ Reply to Thread

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