armylogman
Technical User
here is the code that I am using and I am not very good with VB6
Sub saveExcelAsCsv(DCRASRP.xls As String)
Dim objXlApp As New Excel.Application
Dim objXlBook As Excel.Workbook
' Setup the Excel Workbook to save
Set objXlBook = Excel.Workbooks.Open(DCRASRP.xls)
' Save the Excel file as a CSV file in a temp location
objXlBook.SaveAs "c:\reconnewxls\dcrasrp1.xls", xlCSVWindows
' Clean up
objXlBook.Close True ' Save changes
objXlApp.Quit ' Close Excel
Set objXlBook = Nothing
Set objXlApp = Nothing
End Sub
Any help would be greatly appreciated also when I run this it gives me an error on line 1 char 27.
Sub saveExcelAsCsv(DCRASRP.xls As String)
Dim objXlApp As New Excel.Application
Dim objXlBook As Excel.Workbook
' Setup the Excel Workbook to save
Set objXlBook = Excel.Workbooks.Open(DCRASRP.xls)
' Save the Excel file as a CSV file in a temp location
objXlBook.SaveAs "c:\reconnewxls\dcrasrp1.xls", xlCSVWindows
' Clean up
objXlBook.Close True ' Save changes
objXlApp.Quit ' Close Excel
Set objXlBook = Nothing
Set objXlApp = Nothing
End Sub
Any help would be greatly appreciated also when I run this it gives me an error on line 1 char 27.