Public Function getTblExcel(strExcel
As String)
On Error GoTo Create
Dim xlApp
As Excel.Application
Dim xlWbk
As Excel.Workbook
Dim xlWsh
As Excel.Worksheet
Dim Rng
As Excel.Range
Dim rsNum
As Integer
Set xlApp = GetObject(,
"Excel.Application")
xlApp.Visible =
True
Set xlWbk = xlApp.Workbooks.Add
Set xlWsh = xlWbk.Worksheets(
1)
xlWsh.Activate
xlWbk.Close
Set xlWsh =
Nothing
Set xlWbk =
Nothing
If xlApp.Workbooks.Count =
0 Then
xlApp.Quit
End If
Create:
If Err =
429 Then
Set xlApp = CreateObject(
"Excel.Application")
Resume Next
End If
End Function