LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Excel - Date comparision in VBA

Hey all,

I got this problem.
Every day i have a Macro creating a logfile, that contains the date of
today.

Like "Test" & Cstr(Date) & ".txt".

This works okay and stuff. But now i would like to have a logfile that
is 7 days or older; deleted.

That made me creating the following:

ExpiredDate = Date - 7
Expired = Date = ExpiredDate

this would result in:

Kill "H:/Test" & Cstr(Expired) & ".txt"

But this doesn´t seem to work.. Could someone help me?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text string comparision within excel Fracky Excel Discussion (Misc queries) 1 September 10th 10 07:22 PM
date comparision User Excel Discussion (Misc queries) 0 April 3rd 10 11:31 AM
date range comparision on a criteria TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 April 20th 09 09:55 PM
Date comparision Murray Excel Discussion (Misc queries) 3 September 8th 06 04:58 AM
help with date comparision Jay Baxter Excel Programming 1 February 27th 04 01:56 PM


All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"