• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

FILE DATE

How do I find out if a file we use on the C\drive is today's date Id not stop the user
0
Serena2345
Asked:
Serena2345
1 Solution
 
Serena2345Author Commented:
How do I find out if a file we use on the C\drive is today's date If not stop the user

sorry about the typo
0
 
GrahamSkanRetiredCommented:
Don't quite know what you want to do about it, but this shows how to use VBA to check the file date:

Dim strMyFile As String
strMyFile = "C:\MyFolder\MyFile.txt"
If DateDiff("d", Now, FileDateTime(strMyFile)) <> 0 Then
    MsgBox "This is not today's file"
End If
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now