last modified date of imported text file with VBA

Dark0Prince

Active Member
Joined
Feb 17, 2016
Messages
433
I'm not sure how to do this, but I have an imported file from text, and I need to make sure that the last modified date isn't older then 5days and if it is I need some text box that says "file too old" or something like that.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I am trying to establish if the data is on a single excel sheet - if so we check the date and delete ? the sheet if the date is too old.

How many sheets per day are we talking about ?
 
Upvote 0
I'm not referring to importing an excel sheet I'm referring to a .txt file and I don't want to delete anything. I do imports sporadically throughout the month.
 
Upvote 0
so import the text file into an excel sheet and if date is too old color whole sheet red with conditional formatting, maybe

what do you do if it is too old ?
 
Upvote 0
If it's too old I want it just to show a msg box that it is too old. I don't want the import to complete if possible.
 
Upvote 0
beyond my skills then as I do not know how to analyse a text file without first importing it - tho a macro could import the file, check if too old and if so delete the excel sheet..........
 
Upvote 0
I deff don't want to destroy the sheet let's do the msg box after the import so that I'm informed that I imported an old date. That would be perfect.
 
Last edited:
Upvote 0
I'm not sure how to do this, but I have an imported file from text, and I need to make sure that the last modified date isn't older then 5days and if it is I need some text box that says "file too old" or something like that.
Can you show us the macro or event code that you are using to import your text file?
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top