Hi Everyone
This Forum has been a life saver on numerous occasions.
The code that follows has been courtesy of this forum and the extensive help i received from everyone.
But after an year of using the following code it is giving me the following error:
Runtime Error '1004' Method 'SaveAs' of object'_Workbook Failed
It worked for a while ( 1 year) and then suddenly failed.
A little background on the code.
The code basically is suppose to compare the system date (date on your computer) to a date on the excel file. If the system year is larger than date on the excel file then the system will complete a sort function and then save the file in the following locations myPath = "S:\AdminDocs\Finance\Purchasing\Common\Non-Conforming POs-Database\Archive" in other words does a backup.
The system does the same for month and for date. So if system year is same as excel file year then we compare the month, and if month on the system is higher then the system does a sort and a backup.
That's where the SaveAs runtime error comes in. As far as I know that's where it is failing. I am a bit confused what is causing this problem.
I would really appreciate help, I am so frustrated.
Thanks
Bookmarks