Results 1 to 4 of 4

Thread: Excel object - To save or not to save [RESOLVED]

  1. #1

    Thread Starter
    Fanatic Member joltremari's Avatar
    Join Date
    Sep 2000
    Location
    Mississippi
    Posts
    674

    Excel object - To save or not to save [RESOLVED]

    What is the syntax to NOT prompt me to save the document.
    I want to close it WITHOUT saving the changes.
    VB Code:
    1. msExcelWorkbook.Application.ActiveWorkbook.Save

    Thanks for any help.

    JO
    Last edited by joltremari; Dec 31st, 2002 at 10:18 AM.
    "I have not failed. I've just found 10,000 ways that won't work."
    'Thomas Edison'

    "If we knew what it was we were doing it wouldn't be called research, would it?"
    'Albert Einstein'

    VB6

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    If you want to close without saving, why are you doing a save command instead of just a close command with the nosave option?

    check the object browser for method syntax

  3. #3
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818
    you set the DisplayAlerts property of your Excel object to false.

    This will stop screen prompting.

    If you are leaving Excel open, then turn it back on at the end of your code, else your users could get mighty confused

  4. #4

    Thread Starter
    Fanatic Member joltremari's Avatar
    Join Date
    Sep 2000
    Location
    Mississippi
    Posts
    674
    Thanks... DisplayAlerts, I don't know how I overlooked that!


    I wasn't using that save command, I put it in the post because I thought the syntax for what I needed was something like this:

    msExcelWorkbook.Application.ActiveWorkbook.Save Save:=False

    and if it was then who ever answered would only have to copy and paste it instead of typing it all again...oh well


    Thanks again

    JO

    displayalerts = false ---who'd-a-thunk it!
    "I have not failed. I've just found 10,000 ways that won't work."
    'Thomas Edison'

    "If we knew what it was we were doing it wouldn't be called research, would it?"
    'Albert Einstein'

    VB6

Posting Permissions

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



Click Here to Expand Forum to Full Width