+ Reply to Thread
Results 1 to 3 of 3

saveAS AfterUpdate

  1. #1
    Registered User
    Join Date
    03-02-2006
    Posts
    54

    saveAS AfterUpdate

    In excel if you open a workbook and change anything then you are prompted with the save work when workbook ic closed. How can i reference whether a book has been ammended or updated so that i can diplay the saveAs dialog box instead in order to create audit trail.

    What i really want is something along lines of

    if workbook has changed/updated/ammended whatever then
    application.dialogs.SAVEAS ETC

    else
    close
    end if

    This code will be activated from within a bigger piece of code that follows a number of criteria to decide whether to paste a new set of values in the worksheet

  2. #2
    Tom Ogilvy
    Guest

    RE: saveAS AfterUpdate

    check the Saved property of the workbook

    if not ActiveWorkbook.Saved then
    fname = Application.GetSaveAsFileName()
    Activeworkbook.SaveAs fname
    end if

    --
    Regards,
    Tom Ogilvy


    "cereldine" wrote:

    >
    > In excel if you open a workbook and change anything then you are
    > prompted with the save work when workbook ic closed. How can i
    > reference whether a book has been ammended or updated so that i can
    > diplay the saveAs dialog box instead in order to create audit trail.
    >
    > What i really want is something along lines of
    >
    > if workbook has changed/updated/ammended whatever then
    > application.dialogs.SAVEAS ETC
    >
    > else
    > close
    > end if
    >
    > This code will be activated from within a bigger piece of code that
    > follows a number of criteria to decide whether to paste a new set of
    > values in the worksheet
    >
    >
    > --
    > cereldine
    > ------------------------------------------------------------------------
    > cereldine's Profile: http://www.excelforum.com/member.php...o&userid=32069
    > View this thread: http://www.excelforum.com/showthread...hreadid=538044
    >
    >


  3. #3
    Ivan Raiminius
    Guest

    Re: saveAS AfterUpdate

    Hi Cereldine,

    thisworkbook.saved returns you information if any change (including
    updating links) was done in the workbook since opening/last saving it.

    Regards,
    Ivan


+ 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