I have a series of CSV files that come to me bundled in a folder simply named for the month. I've got code working to find them, open them, parse them and I'm having trouble saving them the way I want to. What I'm aiming at is saving as the same file name as it was just in the new and parsed format.
Sub OpenCSVs_2() Dim MyFiles As String, ThisMonth As String, Convert As String Dim startPath As String ThisMonth = Format(Date, "mmmm") startPath = "C:\Users\ME\Desktop\CSV find convert tests\" & ThisMonth & "\" MyFiles = Dir(startPath & "*.csv") Convert = Dir(startPath & "*xlsx") Do While MyFiles <> "" Workbooks.Open startPath & MyFiles Call Parse1 ActiveWorkbook.SaveAs Filename:="startPath & Convert", FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False MyFiles = Dir '<----------------error happens here Loop End Sub The above actually does something and creates an xlsm file names "startPath & Convert". I'm sure the solution is right in front of me.