I am trying to find a fast way to save my xlsx
files as csv
files with the same file-name as the xlsx
file (just in csv
forma
Right now, you've got the file-name hard-coded in after "ActiveWorkbook.SaveAs
" so it's saving everything with that hard-coded name.
I think you'll want to use "ActiveWorkbook.Name
" to get the name of the current file and concatenate it into the "Filename" variable that you have there (without the file extension) with the new extension. For example:
"C:\Users\padd\Desktop\NEW CSV...ok!\" & Left(ActiveWorkbook.Name, InStr(ActiveWorkbook.Name, ".") - 1) & ".csv")
This is a kind of a dirty way to do it, but it should serve your needs. Also, depending on which version of Excel you use, I think you might need to use "ThisWorkbook
" instead of "ActiveWorkbook
" but I'm not sure.