Hi I have the folloowing script
However it is saving it as a csvx file instead of a csv file?
Any help appreciated.
Code:
Private Sub cmdXlsCsv_Click()
Dim xls As Excel.Application
Dim tmp As String
Dim oWB As Excel.Workbook
Set xls = New Excel.Application
tmp = "C:\Users\cjack\Desktop\Copy of Book5.xlsx"
Set oWB = xls.Workbooks.Open(tmp)
oWB.SaveAs Filename:=Replace(tmp, ".xls", ".csv", , , vbTextCompare), FileFormat:=xlCSVMSDOS, CreateBackup:=False
oWB.SaveAs Filename:=Replace(tmp, ".xls", ".csv", , , vbTextCompare), FileFormat:=xlCSVMSDOS, CreateBackup:=False
oWB.Close
xls.Quit
End Sub
However it is saving it as a csvx file instead of a csv file?
Any help appreciated.