+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 not saving workbook

  1. #1
    Registered User
    Join Date
    03-05-2007
    Posts
    2

    Question Excel 2007 not saving workbook

    Sometimes Excel 2007 doesn't save workbook changes and on two occasions my original workbook was gone from my hard drive after closing the workbook, nor were any Excel backup files to be found in any of the usual locations. Nor am I always getting warnings on closing a workbook that there are unsaved changes. To make sure things were getting saved I added the following code to the Workbook_BeforeClose event:

    Please Login or Register  to view this content.
    The msgbox never pops up so I'm assuming the ThisWorkBook.saved property is indicating there are no changes to be saved.

    I am developing vba code for a tracking workbook and a part of that code copies a "master worksheet" to a "new worksheet" inside the workbook. Usually a few times during a session. Today during testing I had copied two worksheets from the master worksheet and entered data in them. I closed the workbook, but when I reopened it later, the two worksheets were not there. I did find a Microsoft KB note about issues with copying worksheets in the same workbook http://support.microsoft.com/kb/210684, but I am not getting the indicated error message.

    If anyone has experienced anything that might give me a clue what the problem might be I'd be appreciative. At this point I'm pulling my hair out. I'm not having any problems with my VBA code actually working.

    Environment:
    Business Workstation: Excel 2007, Windows XP SP3, corporate networked machine
    Laptop Workstation: Excel 2010, Windows 8, home network
    Workbook is being saved to a portable USB device.
    The problem does not happen on the laptop with Excel 2010.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,721

    Re: Excel 2007 not saving workbook

    Try putting a Stop as the first line in the Workbook Before Close event handler. Then close the workbook. If the code doesn't break on the Stop, the Before Close event hasn't been fired. That could mean Event handling is turned off. If that is the case, switch it back on and try again.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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