Hi,
When i am executing the below code then access starts automatically;
Dim objXL As Object
Dim strpath As String
Dim Combo3 As Variant
On Error Resume Next
Set objXL = GetObject(, "Excel.Application")
Set objXL = GetObject("C:\Apps\Monthly Download\KPI Data File Template.xlsx")
'objXL.Application.Visible = True
'objXL.Parent.Windows(1).Visible = True
strpath = "C:\Apps\Monthly Download\" & Me.Combo3 & ".xlsx"
objXL.SaveAs FileName:=(strpath), FileFormat:=51
I can run run upto this code and after that when i executing the code for export then its restarts and all my work has gone.
When i am executing the below code then access starts automatically;
Dim objXL As Object
Dim strpath As String
Dim Combo3 As Variant
On Error Resume Next
Set objXL = GetObject(, "Excel.Application")
Set objXL = GetObject("C:\Apps\Monthly Download\KPI Data File Template.xlsx")
'objXL.Application.Visible = True
'objXL.Parent.Windows(1).Visible = True
strpath = "C:\Apps\Monthly Download\" & Me.Combo3 & ".xlsx"
objXL.SaveAs FileName:=(strpath), FileFormat:=51
I can run run upto this code and after that when i executing the code for export then its restarts and all my work has gone.