+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Date change @ update only when file is save

  1. #1
    Registered User
    Join Date
    08-09-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Exclamation Date change @ update only when file is save

    hi all,

    I'm now in the middle of preparing a real time document. my boss asked me whether the date will only change when the excel document is updated or saved. if not, the date is remains as per the last update. pls help me...

  2. #2
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    369

    Re: Date change @ update only when file is save

    Hello adzareena. I only know this is possible through use of VBA. In the Workbook Module add this:
    Please Login or Register  to view this content.
    In a each Sheet Module you want to monitor add

    Please Login or Register  to view this content.

    You can either name a range in your workbook MyDateRange or replace MyDateRange in the code with your cell reference. In the workbook module you would need to reference the sheet housing the time if you're using the cell address for the range. Example
    Please Login or Register  to view this content.
    If this is all jibberish to you, we could post a workbook example.
    -Greg If this is helpful, pls click Star icon in lower left corner

  3. #3
    Registered User
    Join Date
    08-09-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Date change @ update only when file is save

    tq..pls do post the workbook example...

  4. #4
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    369

    Re: Date change @ update only when file is save

    Here it is...but I decided to modify it so the workbook/worksheet events call this routine located in a standard module.
    Please Login or Register  to view this content.
    Less code to put into each sheet if you need to add a worksheet change event to all sheets in your workbook.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-09-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Date change @ update only when file is save

    sorry, i'm still don't understand. what should i do with code? can i copy and paste it into the excel file?

  6. #6
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    369

    Re: Date change @ update only when file is save

    The example attached in my last post already has the code in it. If you're unfamiliar with Excel macros continue reading. If you press the alt key along with F11 (ALT + F11) you'll get to the VBE (Visual Basic Editor). From there you should see the Project Explorer on the left where you will find worksheet and workbook objects (within the Microsoft Excel Objects folder) and Modules (in the Module folder). Double-clicking those will bring up their code in the main window area. That should be a good start for you.

+ 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