Results 1 to 4 of 4

Closing a Workbook, discard modifications

Threaded View

  1. #1
    Registered User
    Join Date
    01-15-2009
    Location
    Rio de Janeiro
    MS-Off Ver
    Excel 2003
    Posts
    3

    Unhappy Closing a Workbook, discard modifications

    I have a VBA macro that catches data from website, copies it to a workbook, closes the temporary WB and goes back to the original WB. In order to automate the process, I use the sequence, when closing the WB:
    .
    Application.DisplayAlerts = False
    ActiveWorkbook.Close
    Application.DisplayAlerts = True
    .
    After working well for about 2 years, suddenly the little window asking whether or not I want to keep modifications to the tem WB shows again:
    "Do you wish to save the modifications ? "
    .
    Logic:
    1. Gets stock ticker from column "A"
    2. Consults a stock website, which return a page with data
    3. Searchs inside that page, does little change, gets the data
    4. Copies data
    5. Closes the temp WB, discarding changes
    6. Writes data obteined to main WB
    7. Loop
    .
    This is a repetitive process, more than 1.000 iterations. I need it fully automated, as it has been for 2 years, via the use of
    Application.DisplayAlerts = False
    .
    My feeling is that I must have done something very wrong with Excel options or something - without noticing - for this to happen.
    .
    Any thoughts would be very much appreciated.
    .
    The WB is here, should someone cares to take a peek (less than 100KB):
    .
    http://rapidshare.com/files/18307731...ECOTA.zip.html
    .
    Comments in the VBA macro are in portuguese, but the code is standard, of course.
    .
    I also removed competely MS Office 2003 pt-BR and reinstalled, for no luck.

    Thanks !
    Last edited by royUK; 01-15-2009 at 05:37 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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