Set objExcel = CreateObject("excel.application")
objExcel.Application.DisplayAlerts = False
objExcel.Application.Visible = true
objExcel.Workbooks.Open (Ls_filename)
With objExcel
If .Application.Windows().Count = 1 Then
.Application.Quit
'Excel is already active before this program starts.
Else
.Close
End If
Set objExcel = Nothing
End With
objExcel.Application.DisplayAlerts = False
objExcel.Application.Visible = true
objExcel.Workbooks.Open (Ls_filename)
With objExcel
If .Application.Windows().Count = 1 Then
.Application.Quit
'Excel is already active before this program starts.
Else
.Close
End If
Set objExcel = Nothing
End With
xlsobj.Workbooks.Open (FileName)
Call xlsobj.Run("Report", A, B, C, D)
xlsobj.Visible = True