+ Reply to Thread
Results 1 to 2 of 2

Help with closing down a workbook??

  1. #1
    Don
    Guest

    Help with closing down a workbook??

    First off....if this turns into a double post, I apologize....I tried to post
    this about an hour ago but something messed up and I really don't think it
    went through.

    Project: I've got a workbook...7 sheets...only one that is available
    (easily) to the operator. This operator sees the opening page and clicks on
    one of several macro'd buttons....that takes him a data entry sheet and a
    data-form opens....when the data is entered, he/she closes the data-form and
    the macro prints the page, erases the entered data and returns to the opening
    page. I've used an open workbook module to get rid of the tabs, formula
    bars, etc, so, unless he/she knows Excel fairly well, it'd be a little
    difficult for them to corrupt the programming.

    I've also incorporated a before_closing module, which resets the formula
    bars, tabs, etc...then closes the program...

    Problem: There is no need ever for the operator to save this workbook...but
    I found that when it goes into the close routine, the standard window "do you
    want to save changes" pops up.....and if you hit cancel at that point the
    book stays open and all the formula bars, tabs, etc are now active.

    Question: Is there a way to bypass that "save" window?

    Thanks in advance and again, if this is double posted, I do apologize,

    Have a great day,

  2. #2
    Vasant Nanavati
    Guest

    Re: Help with closing down a workbook??

    Put this code in the ThisWorkbook code module:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Saved = True
    End Sub

    --

    Vasant



    "Don" <[email protected]> wrote in message
    news:[email protected]...
    > First off....if this turns into a double post, I apologize....I tried to

    post
    > this about an hour ago but something messed up and I really don't think it
    > went through.
    >
    > Project: I've got a workbook...7 sheets...only one that is available
    > (easily) to the operator. This operator sees the opening page and clicks

    on
    > one of several macro'd buttons....that takes him a data entry sheet and a
    > data-form opens....when the data is entered, he/she closes the data-form

    and
    > the macro prints the page, erases the entered data and returns to the

    opening
    > page. I've used an open workbook module to get rid of the tabs, formula
    > bars, etc, so, unless he/she knows Excel fairly well, it'd be a little
    > difficult for them to corrupt the programming.
    >
    > I've also incorporated a before_closing module, which resets the formula
    > bars, tabs, etc...then closes the program...
    >
    > Problem: There is no need ever for the operator to save this

    workbook...but
    > I found that when it goes into the close routine, the standard window "do

    you
    > want to save changes" pops up.....and if you hit cancel at that point the
    > book stays open and all the formula bars, tabs, etc are now active.
    >
    > Question: Is there a way to bypass that "save" window?
    >
    > Thanks in advance and again, if this is double posted, I do apologize,
    >
    > Have a great day,




+ 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