I am new to VB and I'm trying to rename a file and the file will always have yesterdays date such as DailyFile#R0906. Here is what I am using but I'm unsure how to find the correct file to rename.
FileName = "F:\DAILYFILE#R & Format(Date -1, "mmdd")
NewFileName = "F:\R347" & Format(Date -1, "mmdd")
Name FileName As NewFileName
FileName = "F:\DAILYFILE#R & Format(Date -1, "mmdd")
NewFileName = "F:\R347" & Format(Date -1, "mmdd")
Name FileName As NewFileName