I have the code below to save the current file as an .xlsx file, but when I try to re-open the file, I get a file type error. It appears to be saving the document as an .xlsx file but it truly is staying in the .csv file type which was originally downloaded which Excel cannot access.
What I ultimately want is to have the document changed from .csv to .xlsx file type in a user defined location with the given file name and the date. The date is available in the file and is the day prior to the current date. Example: Trial save mm.dd.yyyy The date needed is located in cell E5 of the document.
Below is the code as it stands currently. I must remember to then save as again to change from .csv to .xlsx.
Dim path As Variant
path = Application.GetSaveAsFilename( _
Title:="Select a File Location", _
InitialFileName:="Trial save", _
FileFilter:="Excel Files, *.xlsx")
If path = False Then
MsgBox "No Loction Selected!", 16
Else
ActiveWorkbook.SaveAs path
End If
What I ultimately want is to have the document changed from .csv to .xlsx file type in a user defined location with the given file name and the date. The date is available in the file and is the day prior to the current date. Example: Trial save mm.dd.yyyy The date needed is located in cell E5 of the document.
Below is the code as it stands currently. I must remember to then save as again to change from .csv to .xlsx.
Dim path As Variant
path = Application.GetSaveAsFilename( _
Title:="Select a File Location", _
InitialFileName:="Trial save", _
FileFilter:="Excel Files, *.xlsx")
If path = False Then
MsgBox "No Loction Selected!", 16
Else
ActiveWorkbook.SaveAs path
End If