I have code that I use to convert a file to a .xls file...It works great. I was wondering though if it were possible to add code to this so that it makes a copy of the file as is before it changes the extension..
Thanks,
Code:
TheFile = Application.GetOpenFilename("LOD Load Files (*.LOD), *.LOD", , "Open LOD File")
If TheFile = "False" Then
Exit Sub
End If
Oldfilename = TheFile
' Separate the file path and file name
BS = InStrRev(Oldfilename, "\")
Oldfilepath = Left(Oldfilename, BS)
Newfilename = Right(Oldfilename, Len(Oldfilename) - BS)
' Add the XLS extension to the file name
Dot = InStr(1, Newfilename, ".")
Newfilename = Oldfilepath & Left(Newfilename, Dot) & "xls"
' Rename the file
Name Oldfilename As Newfilename
Workbooks.Open Filename:=Newfilename
Thanks,