+ Reply to Thread
Results 1 to 5 of 5

Creation Date

  1. #1
    Kjell Forssen
    Guest

    Creation Date

    Hi
    Why doesn´t this code work?

    ActiveWorkbook.SaveAs FName
    Sheets("Offert").Select
    Range("D13").Select
    ActiveCell.Value = ActiveWorkbook.BuiltinDocumentProperties("Creation
    Date")

  2. #2
    Bob Phillips
    Guest

    Re: Creation Date

    It does work, but you might want to format it

    ActiveCell.Value = Format(ActiveWorkbook.BuiltinDocumentProperties( _
    "Creation Date"), "dd mmm yyyy hh:mm:ss")


    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "Kjell Forssen" <KjellForssen@discussions.microsoft.com> wrote in message
    news:8BEBFCA9-9ED1-4348-B347-98CBDF2588D9@microsoft.com...
    > Hi
    > Why doesn´t this code work?
    >
    > ActiveWorkbook.SaveAs FName
    > Sheets("Offert").Select
    > Range("D13").Select
    > ActiveCell.Value = ActiveWorkbook.BuiltinDocumentProperties("Creation
    > Date")




  3. #3
    macropod
    Guest

    Re: Creation Date

    Hi Kjell,

    This should work:
    With ActiveWorkbook
    .SaveAs FName
    .Sheets("Offert").Range("D13").Value = _
    .BuiltinDocumentProperties("Creation Date")
    End With

    Cheers

    --
    macropod
    [MVP - Microsoft Word]


    "Kjell Forssen" <KjellForssen@discussions.microsoft.com> wrote in message
    news:8BEBFCA9-9ED1-4348-B347-98CBDF2588D9@microsoft.com...
    > Hi
    > Why doesn´t this code work?
    >
    > ActiveWorkbook.SaveAs FName
    > Sheets("Offert").Select
    > Range("D13").Select
    > ActiveCell.Value = ActiveWorkbook.BuiltinDocumentProperties("Creation
    > Date")




  4. #4
    Kjell Forssen
    Guest

    RE: Creation Date

    Hi again
    Thank you for helping me.
    It works as before wich means that I am getting the wrong date - its not the
    templates date and not the date when the user template with the macros was
    created and not todays date. It seems to me like if the worksheet has a
    permanent date (20060418) wich not is changed when a new worksheet is created.
    Great to hear from you again!
    Kjell





    "Kjell Forssen" wrote:

    > Hi
    > Why doesn´t this code work?
    >
    > ActiveWorkbook.SaveAs FName
    > Sheets("Offert").Select
    > Range("D13").Select
    > ActiveCell.Value = ActiveWorkbook.BuiltinDocumentProperties("Creation
    > Date")


  5. #5
    macropod
    Guest

    Re: Creation Date

    Hi Kjell,

    If the user saved the file using Save As, that might change the Creation
    Date.

    Cheers

    --
    macropod
    [MVP - Microsoft Word]


    "Kjell Forssen" <KjellForssen@discussions.microsoft.com> wrote in message
    news:3662A036-B18A-4232-BDAC-1DFFD2A56DBF@microsoft.com...
    > Hi again
    > Thank you for helping me.
    > It works as before wich means that I am getting the wrong date - its not

    the
    > templates date and not the date when the user template with the macros was
    > created and not todays date. It seems to me like if the worksheet has a
    > permanent date (20060418) wich not is changed when a new worksheet is

    created.
    > Great to hear from you again!
    > Kjell
    >
    >
    >
    >
    >
    > "Kjell Forssen" wrote:
    >
    > > Hi
    > > Why doesn´t this code work?
    > >
    > > ActiveWorkbook.SaveAs FName
    > > Sheets("Offert").Select
    > > Range("D13").Select
    > > ActiveCell.Value =

    ActiveWorkbook.BuiltinDocumentProperties("Creation
    > > Date")




+ 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