The following line in my VBA code is generating the compile error 'Compiler error expected: =' implying that it expected an assignment. What am I doing wrong and how do I fix this?
I just want to save the file. Also, I want to overwrite the file which was previously a .xls or .xlsx file. Will this line do that?
Workbooks(theFile).SaveAs("Z:\test\vhb\" & newName, xlCSV)
You do not use parentheses unless you are assigning to a variable.
Workbooks(theFile).SaveAs "Z:\test\vhb\" & newName, xlCSV
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With