I have code (using VBA Access 2010) that checks to see if a File exists (it works). If the File exists I need to rename it and MOVE it to a local location.
In the code below the NEW file name is newpriceMonthYear where vMonthYear (for October) would be 102017.txt and the new file name will be "newprice102017.txt". Creating vMonthYear works. vMonthYear is Dim'd as a STRING The code executes with no errors but the File is NOT moved
CODE:
Dim FSO As FileSystemObject
FileToMove = "C:\RDC-POS\OLCC Downloads\newprice.txt"
DestPath = "C:\RDC-POS\OLCC Past Downloads\newprice" & vMonthYear
FSO.MoveFile FileToMove, DestPath
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Expert of the Year award recognizes an expert who helped improve Experts Exchange in the past year through high levels of contributions and participation on site. This award is given to the expert who has achieved the highest levels of participation, while maintaining quality contributions and professionalism.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.