I recorded the following code to save my file as a .xlsx (it starts as a .csv)
It works great to save the file in the proper format. What it doesn't do is, it doesn't allow the user to update the name with the proper product code and ID. It just saves it in the path above automatically.
I have the following code that prompts and allows the user to change the name.
The problem with this bit of code is that even though it says it saves it as a .xlsx, when I try to open the saved file, it tells me it cannot because the file format or file extension is invalid. I've even tried to do .xls instead which gets me part way there. It'll allow me to open the file but all the formatting is gone and data has a bunch of commas. I really need it to be a .xlsx at the end of the day. I was just trying different things along the way.
Is there any way to get it to do what I need? Any help would be greatly appreciated.
Code:
ActiveWorkbook.SaveAs Filename:= _"C:\Users\Doug\Desktop\PARSED_PRODUCT CODE_ID.xlsx", FileFormat:=xlOpenXMLWorkbook _
, CreateBackup:=False
I have the following code that prompts and allows the user to change the name.
Code:
ActiveWorkbook.SaveAs Filename:=Application.GetSaveAsFilename("PARSED_PRODUCT CODE_ID" & ActiveWorkbook.Name, _
fileFilter:="Excel Workbook (*.xlsx),*.xlsx,")
Is there any way to get it to do what I need? Any help would be greatly appreciated.