I have VBA project that imports a text file into a SQL database. This is working wonderfully. However at the end of that, I want to rename the text file to a .imp file so that we know that this has imported already. This should be ridiculously simple but my doesn't work and does not return any errors.
I put a watch on the variables stFileName and StImportedFileName and they are holding the proper values.
Any ideas what I am doing wrong? Here is my code:
Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools:
I put a watch on the variables stFileName and StImportedFileName and they are holding the proper values.
Any ideas what I am doing wrong? Here is my code:
Code:
'rename text file so it would be difficult to re-import the file by mistake
Dim stImportedFileName As String
stImportedFileName = Replace(stFileName, ".txt", ".imp")
Name stFileName As stImportedFileName
Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: