Solved

FILE DATE

Posted on 2012-03-09
2
138 Views
Last Modified: 2012-03-26
How do I find out if a file we use on the C\drive is today's date Id not stop the user
0
Comment
Question by:Serena2345
2 Comments
 

Author Comment

by:Serena2345
ID: 37702462
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
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 37702844
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Office 2010 repair wrong version 5 55
excel VBA sending mail 9 50
Microsoft Office 2013 Drag and Drop 10 77
Retrieve Windows Office Files from Parallels 12 VM 9 61
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now