Save File As

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

C:\Import Data\exceldr.dat

Can someone help me with code to do the following with the
file above:

Open exceldr.dat with Excel
Save File as a spreadsheet (exceldr.xls) in the same
location
Close Excel.

VBA code is not my specialty so any help is greatly
appreciated.
 
Dim objXL as Object
Dim objBook as Object

Set objXL = CreateObject ("Excel.Application")
Set objBook = ObjXL.Workbooks.Open(strTargetFile)
objBook.SaveAs strNewFileName
Set objBook = Nothing
objXL.Quit
Set objXL=Nothing
 
Back
Top