Consulting

Results 1 to 2 of 2

Thread: file created date

  1. #1

    file created date

    Hello
    I want to compare between 2 files by the date they were created and separate the month from the created date.

    Thank you

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    [VBA]
    Sub ShowFileInfo()
    Dim fs, f, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFile("C:\AAA\Example.xls")
    s = "Created: " & Format(f.DateCreated, "MMMM")
    MsgBox s
    End Sub
    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •