hello ,
i am using ActiveReports 2.0 in visual basic 6.0
i can use its feature for excel 97-2000-2003. but i can not use it for excel 2007 and excel 2010
so there is the code :
Sub excel_at(p_obj As ActiveReport)
On Error GoTo err1
Dim xls As ARExportExcel
Dim xpath As String
Dim ret As Double
Set xls = New ARExportExcel
xls.FileName = App.path & "\XLReport.xls"
p_obj.Run False
xls.Export p_obj.Pages
Set p_obj = Nothing
Set xls = Nothing
xpath="C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE"
ret = Shell(xpath & " " & App.path & "\XLReport.xls", vbMaximizedFocus)
Exit Sub
err1:
MsgBox Err.Description, 64, "ERROR"
End Sub
please help me.
i am using ActiveReports 2.0 in visual basic 6.0
i can use its feature for excel 97-2000-2003. but i can not use it for excel 2007 and excel 2010
so there is the code :
Sub excel_at(p_obj As ActiveReport)
On Error GoTo err1
Dim xls As ARExportExcel
Dim xpath As String
Dim ret As Double
Set xls = New ARExportExcel
xls.FileName = App.path & "\XLReport.xls"
p_obj.Run False
xls.Export p_obj.Pages
Set p_obj = Nothing
Set xls = Nothing
xpath="C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE"
ret = Shell(xpath & " " & App.path & "\XLReport.xls", vbMaximizedFocus)
Exit Sub
err1:
MsgBox Err.Description, 64, "ERROR"
End Sub
please help me.