I came back to work this morning after a two-day vacation. While I was gone, I received a new laptop with my files moved back over without my backed up macros. I now have to rebuild my macros.
I am using the Kill command to remove my source data files at the end of my macro before using application.quit.
Kill "C:\users\name\Desktop\folder\file1.csv"
Kill "C:\users\name\Desktop\folder\file2.csv"
Kill "C:\users\name\Desktop\folder\file3.csv"
Kill "C:\users\name\Desktop\folder\file4.csv"
Application.Quit
End Sub
Not all the files will have data in them (the file is not brought over), so if file3.csv is not present the debugger comes and doesn't bypass it and delete file.4csv. How dow I get kill to ignore file3.csv if it is not present? I had this working before my computer refresh.
Any help would be appreciated.
Bookmarks