Hello,
I'm sorry I'm very new to this, but I am having a problem saving as with VBA. I recorded a macro, and have amended a bit from other posts. This is what I have so far. I am trying to save a .txt file as a .csv with the current file name.
But I get a runtime error that it cannot access file.
Any help much appreciated.
Sub Saveas()
'
' Saveas Macro
'
'
ActiveWorkbook.Saveas Filename:= _
"Data/W1/" + ActiveWorkbook.Name + ".csv" _
, FileFormat:=xlCSVUTF8, CreateBackup:=False
End Sub
I'm sorry I'm very new to this, but I am having a problem saving as with VBA. I recorded a macro, and have amended a bit from other posts. This is what I have so far. I am trying to save a .txt file as a .csv with the current file name.
But I get a runtime error that it cannot access file.
Any help much appreciated.
Sub Saveas()
'
' Saveas Macro
'
'
ActiveWorkbook.Saveas Filename:= _
"Data/W1/" + ActiveWorkbook.Name + ".csv" _
, FileFormat:=xlCSVUTF8, CreateBackup:=False
End Sub