+ Reply to Thread
Results 1 to 9 of 9

how stop "do you wnat to save etc.msg

  1. #1
    Registered User
    Join Date
    07-16-2012
    Location
    Berkeley,CA
    MS-Off Ver
    Excel 2007
    Posts
    13

    how stop "do you wnat to save etc.msg

    I am using excel 2007 but most of my files are excel 2003. Some of them don't give me the "Do you wnat to save etc.msg" on closing after changes. Some have VBA code (not all exactly the same.) When I delete the code, they still close without the message. Why? When I put the same code in one that does generate the message,,it makes no difference. I am obviously missing something.

    My need is that I have and Access 2007 file that exports data to an Excel 2003 file, then imports the results. I need to eliminate the "Do you want to save etc" It is just a real bother for the Access user.

    Any help much appreciated.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,008

    Re: how stop "do you wnat to save etc.msg

    .
    Paste this macro into the ThisWorkbook Module :

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-16-2012
    Location
    Berkeley,CA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: how stop "do you wnat to save etc.msg

    My 2nd reply, I wonder if I am just getting into the coding incorrectly. I just can't even make a new file that works. Could you please give me the very basic steps. I click on Developer, then Visual Basic, then Insert, then paste in code. Correct? Am I missing something?

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,008

    Re: how stop "do you wnat to save etc.msg

    .
    Yes ...

    Click on Developer / Visual Basic / ThisWorkbook (upper left side window).

    In the large white colored code window on the right, paste the macro there.

    Save the workbook as a Macro_Enabled .xlsm file.

    Whenever you close the workbook it will automatically save any changes and close on it's own.

    If you don't want to save any changes when the workbook closed make the following changes to the code :

    'ThisWorkbook.Save '<--- comment out this line by placing an apostrophe in front of it.

    ThisWorkbook.Saved = False '<--- then delete the apostrophe from in front of this line.

  5. #5
    Registered User
    Join Date
    07-16-2012
    Location
    Berkeley,CA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: how stop "do you wnat to save etc.msg

    I am still stuck. I do not see anywhere on screen " ThisWorkbook" When I click on Developer / Visual Basic /. All I get are a header with choices . I clicked on Insert and got choice of: Procedure, UserForm, Module, Class Module, File..... I inserted the code into Module and also Class Module. No effect. I tried it on my other computer and same. How am I missing ThisWorkBook? Again, thank you- I much appreciate your patience with me.

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,008

    Re: how stop "do you wnat to save etc.msg

    .
    ThisWorkbook.jpg


    See the above image.
    Last edited by Logit; 08-13-2018 at 12:04 AM.

  7. #7
    Registered User
    Join Date
    07-16-2012
    Location
    Berkeley,CA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: how stop "do you wnat to save etc.msg

    I forgot to mention. On upper left, when I click on Visual Basic, I get "Microsft Visual Basic-my file's name-[Class1(Code)]. On the example you sent me, ThisWorkbook appears where my file says Class1. Confusing.

  8. #8
    Registered User
    Join Date
    07-16-2012
    Location
    Berkeley,CA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: how stop "do you wnat to save etc.msg

    Thanks so much. I finally got it. I work a lot with Access, not enough with Excel apparently. Other than messing with numbers, I have never really used it. People have given me files to update, apparently with necessary vba code already set up. Learned a lot in messing with this. You have been very patient. Appreciate it a lot. Thanks again

  9. #9
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,008

    Re: how stop "do you wnat to save etc.msg

    .
    You are welcome. Glad to help and more so that you were able to gain knowledge from the experience.

    Cheers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA Code to stop "SAVE AS"
    By bonsalp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-16-2017, 11:39 AM
  2. wnat to learn excel 2013 vba
    By party888 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-07-2015, 01:27 PM
  3. I wnat to update closed wrkbook with our open it .is this can you please help.
    By softsandesh in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 08-29-2014, 07:49 AM
  4. [SOLVED] How to stop the "Save As" warning
    By heathbo in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-16-2013, 04:17 AM
  5. Stop "save changes" message appearing
    By DJ Dusty in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2006, 10:42 AM
  6. [SOLVED] Stop "Save as" and Copy File
    By maperalia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2005, 01:05 AM
  7. How do I stop the "do you want to save changes" prompt using VB code
    By john928 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2005, 12:05 PM

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