Excel automation - create xls not xlsx

I have Office 2007 installed, when i run automation code to create a excel workbook, it creates the .xlsx.  I need it to create the .xls.  How do I specify this?

Below is my code that I call to create the workbook...
Public Sub CreateExcelWorkbook(strTemplate)
 
Set oXL = CreateObject("Excel.Application")
oXL.Visible = False
 
If strTemplate = "" Then
    Set oWB = oXL.Workbooks.Add
Else
    Set oWB = oXL.Workbooks.Add(strTemplate)
End If
 
End Sub

Open in new window

LVL 2
michael1174Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
save the excel file like this

oXL.saveas  "c:\MyExcel.xls", fileformat:=56
0
All Courses

From novice to tech pro — start learning today.