Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

FILE DATE

Posted on 2012-03-09
2
Medium Priority
?
148 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
New style of hardware planning for Microsoft Exchange server.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

916 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