+ Reply to Thread
Results 1 to 17 of 17

Change the Creation Date and time of Excel Workbook

  1. #1
    Forum Contributor
    Join Date
    04-13-2012
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    185

    Change the Creation Date and time of Excel Workbook

    Hello Everybody,
    I want to change the Date of Creation and Time of Excel Workbook (Date of Creation must be in Past). Is it possible using VBA Macro?
    Last edited by kate.middleton1; 01-13-2013 at 11:28 AM.

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Change the Creation Date and time of Excel Workbook

    Kate,

    try (assuming date format dd/mm/yyyy, change when needed (do display first)

    Please Login or Register  to view this content.
    If you like my contribution click the star icon!

  3. #3
    Forum Contributor
    Join Date
    04-13-2012
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Change the Creation Date and time of Excel Workbook

    Hello
    Thanks for your reply, i have run this macro in module and save the workbook and close it and when i see the creation date using right click its still the same (which means that the creation date is not set up to the past)...
    Last edited by kate.middleton1; 01-13-2013 at 10:40 AM.

  4. #4
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Change the Creation Date and time of Excel Workbook

    Using the statement I gave you, you can change the internal document property. From your comment I get a feeling that you want to change the file object property maintained by the file system. I am not sure whether that can be changed. Maybe someone else can help?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Change the Creation Date and time of Excel Workbook

    My VBA is pretty much non-existant, but I'm thinking that file creation dates are set by windows, not Excel, and as such, need to be changed through windows.

    There are quite a few (free) programs available (google "change file date") that will allow you to change a files attributes (dates etc)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Change the Creation Date and time of Excel Workbook


  7. #7
    Forum Contributor
    Join Date
    04-13-2012
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Change the Creation Date and time of Excel Workbook

    Actually due to the securities purpose i cant download any program to change the excel date. I just need the vba macro to change date (if possible).

  8. #8
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Change the Creation Date and time of Excel Workbook

    Quote Originally Posted by kate.middleton1 View Post
    Actually due to the securities purpose i cant download any program to change the excel date. I just need the vba macro to change date (if possible).
    Kate, the link I gave you shows you all code needed. The code presented is written in VB but it also works in VBA

  9. #9
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Change the Creation Date and time of Excel Workbook

    Hi,

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  10. #10
    Forum Contributor
    Join Date
    04-13-2012
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Change the Creation Date and time of Excel Workbook

    Hello HaHoBe
    I have used your code and i give the link of the workbook that i need to change the date of creation. But unfortunately when i see the creation date using right click the date remain unchanged.

  11. #11
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Change the Creation Date and time of Excel Workbook

    @Kate.middleton

    I just used HaHoBe code and it worked.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  12. #12
    Forum Contributor
    Join Date
    04-13-2012
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Change the Creation Date and time of Excel Workbook

    Hello OllieB
    The link the you have given to me i didnt now that how to set the past date using this code.

  13. #13
    Forum Contributor
    Join Date
    04-13-2012
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Change the Creation Date and time of Excel Workbook

    Hallo mike7952
    then may be i am using windows7 and this code might not worked on windows 7.

  14. #14
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Change the Creation Date and time of Excel Workbook

    Kate,

    Did you close the document properties dialog and reopen it after you ran the code?

  15. #15
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Change the Creation Date and time of Excel Workbook

    Im using windows 7 also, and excel 2003,2007 worked for both.

  16. #16
    Forum Contributor
    Join Date
    04-13-2012
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Change the Creation Date and time of Excel Workbook

    Hello mike7
    can you please share here your tested workbook with working code..

  17. #17
    Forum Contributor
    Join Date
    04-13-2012
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    185

    Re: Change the Creation Date and time of Excel Workbook

    Yes, mike7 you were right this code worked, thanks a lot all of you for my help.

+ 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