Hi,
I have som VBA code that creates a csv file with todays date. Can anyone offer any advice on how to overwrite this csv file (without the user being prompted) if it is still the same date?
Thanks,
Roy
I have used the following code for somthing similar
Code:
Application.DisplayAlerts = False
FileStamp = FileDateTime("\\XXXX\XXXX\XXXX\XXXXX.CSV")
FileDate = Mid(FileStamp, 1, 10)
TodayDate = Mid(Date, 1, 10)
If FileDate = TodayDate Then
~code to save file~
end if
Application.DisplayAlerts = True
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.