troubleshooting Question

Renaming a file with a not always current date contained within it

Avatar of vdornan
vdornan asked on
Microsoft Access
15 Comments1 Solution323 ViewsLast Modified:
I am sure this has been asked many times, but is there a way within Access VBA to rename a file that has a date contained within it. The thing is that the date is not always a current date. My understanding is that you can't use wildcards while renaming a file.

I have attached the piece of code I use for renaming a file with the current date, but not sure how go about if its not a current date.

Any help would be great. Thanks.
Function Rename()
	Name "File Name " & Format(Now(), "M-D-YYYY") & ".xlsx" As "File Name.xlsx"
End Function
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 15 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros