We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Frustrating excel issue can you help?

Options
I often work between both word and excel. A little annoyance I have is that I often use the red X in the top right hand corner to exit a word document. Now if I have not saved my work then I am prompted to do so….Great. However, if I have more than one excel workbook open and use the Red X to close then often both workbooks will be closed without prompting to save workbooks. This has caught me out a couple of times now. I know the obvious answer is to exit work books via the small Black X in the top right hand corner and to save before closing but there must be another solution?
«1

Comments

  • The_Grandmaster
    The_Grandmaster Posts: 1,424 Forumite
    Part of the Furniture Combo Breaker
    jgallcash wrote: »
    I often work between both word and excel. A little annoyance I have is that I often use the red X in the top right hand corner to exit a word document. Now if I have not saved my work then I am prompted to do so….Great. However, if I have more than one excel workbook open and use the Red X to close then often both workbooks will be closed without prompting to save workbooks. This has caught me out a couple of times now. I know the obvious answer is to exit work books via the small Black X in the top right hand corner and to save before closing but there must be another solution?

    May not be a good solution but maybe try and always use control and s to save every so often. A good habit especially if programme suddenly crashes.
  • Vomityspice
    Vomityspice Posts: 637 Forumite
    Part of the Furniture Combo Breaker
    Why not just write a short VBA macro to save your workbook on close??

    That way, excel will automatically save when you hit the red button
  • Fairwinds
    Fairwinds Posts: 776 Forumite
    Part of the Furniture 500 Posts Combo Breaker
    What version of excel are you using?
  • littlepanther
    littlepanther Posts: 155 Forumite
    OK, there are two things here. Switch on Autosave by going into Tools menu and selecting Options.. At least you wont lose too much.

    You are closing the application by clicking in the top right hand corner, if you only want to close the workbook that is open click on the X that is below the X in the top right hand corner.

    Finally, Excel will prompt you to save any unsaved workbooks that are open when you close Excel. I have seen many people disagree with me but then it turns out they have clicked the wrong button when promoted to save.
    Hi, we’ve had to remove your signature. If you’re not sure why please read the forum rules or email the forum team if you’re still unsure - MSE ForumTeam
  • Fairwinds
    Fairwinds Posts: 776 Forumite
    Part of the Furniture 500 Posts Combo Breaker
    Standard Excel procedure is that it will ask to save unsaved changes before closing. However I have read about an issue affecting 2003. Hence why asking which version you are using
  • Vomityspice
    Vomityspice Posts: 637 Forumite
    Part of the Furniture Combo Breaker
    Try this:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.DisplayAlerts = False
    ActiveWorkbook.Save
    Application.DisplayAlerts = True
    End Sub
  • jgallcash
    jgallcash Posts: 645 Forumite
    Part of the Furniture 100 Posts Combo Breaker
    Try this:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.DisplayAlerts = False
    ActiveWorkbook.Save
    Application.DisplayAlerts = True
    End Sub

    !!!!!!!!!:eek: That is literally German to me.

    The version at work is 2003.
  • googler
    googler Posts: 16,103 Forumite
    Part of the Furniture 10,000 Posts Name Dropper Combo Breaker
    Try this:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.DisplayAlerts = False
    ActiveWorkbook.Save
    Application.DisplayAlerts = True
    End Sub


    Try this WHERE?

    Type it into cells? If not, where.....?
  • PhilCo_2
    PhilCo_2 Posts: 136 Forumite
    googler wrote: »
    Try this WHERE?

    Type it into cells? If not, where.....?

    If you want to use that you'll need to go to the VBA editor (press ALT&F11), double click on This Workbook in the left panel and paste the code on the right panel. Only problem with it is you'll need to make sure macros are turned on for it to work.
  • PhilCo_2
    PhilCo_2 Posts: 136 Forumite
    jgallcash wrote: »
    I often work between both word and excel. A little annoyance I have is that I often use the red X in the top right hand corner to exit a word document. Now if I have not saved my work then I am prompted to do so….Great. However, if I have more than one excel workbook open and use the Red X to close then often both workbooks will be closed without prompting to save workbooks. This has caught me out a couple of times now. I know the obvious answer is to exit work books via the small Black X in the top right hand corner and to save before closing but there must be another solution?

    If more than one file is being closed you should get a message box per file asking if you want to save. If no changes have been made to a file since you opened it you won't get a save option as there's no need.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.8K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.8K Work, Benefits & Business
  • 598.7K Mortgages, Homes & Bills
  • 176.8K Life & Family
  • 257.1K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.