I want to allow the ability to export a recordset to Excel - but some of my users may not have Excel installed.
Is there something that can check for the existence of Excel on a machine before I attempt to open it? I'm using great code found on an earlier thread, but my concern is that it will generate an error if there is no Excel.
. . .
Dim objExcelApp As Excel.Application
Dim xlsExcelSheet As Excel.Worksheet
Dim col As Long
Dim row As Long
Set objExcelApp = New Excel.Application
objExcelApp.Visible = False
objExcelApp.Workbooks.Add
If Val(objExcelApp.Application.Version) >= 8 Then
Set xlsExcelSheet = objExcelApp.Worksheets(1)
Else
Set xlsExcelSheet = objExcelApp
End If
. . .
Also, will referencing the Excel 9.0 Object Library cause a break if Excel isn't installed?
Thanks much!
Is there something that can check for the existence of Excel on a machine before I attempt to open it? I'm using great code found on an earlier thread, but my concern is that it will generate an error if there is no Excel.
. . .
Dim objExcelApp As Excel.Application
Dim xlsExcelSheet As Excel.Worksheet
Dim col As Long
Dim row As Long
Set objExcelApp = New Excel.Application
objExcelApp.Visible = False
objExcelApp.Workbooks.Add
If Val(objExcelApp.Application.Version) >= 8 Then
Set xlsExcelSheet = objExcelApp.Worksheets(1)
Else
Set xlsExcelSheet = objExcelApp
End If
. . .
Also, will referencing the Excel 9.0 Object Library cause a break if Excel isn't installed?
Thanks much!