Hi All,
I have this code in an access database form, Problem is each time i run it, it loads an instance of Excel in the background, Hence I can 10 Excels running at once.
How Do I remove the Current Instance of excel at the end of the code on my form?
Dim objXl As Excel.Application
Dim objWkb As Excel.Workbook
Dim objSht As Excel.Worksheet
Set objXl = New Excel.Application
With objXl
.Visible = False
Set objWkb = .Workbooks.Open("f:\forecast\proposal\" & Me.Proposal & ".xls"
.Range("Document"
.Value = "0" & Me.Job_Number & "J"
.Range("became"
.Value = Date
.Range("propno"
.Value = Me.Proposal
.Range("H4"
.Value = "PO" & Me.Customer_PO
objWkb.SaveAs ("f:\forecast\proposal\" & Me.Proposal & ".xls"
objWkb.PrintOut
objWkb.Close
End With
I have this code in an access database form, Problem is each time i run it, it loads an instance of Excel in the background, Hence I can 10 Excels running at once.
How Do I remove the Current Instance of excel at the end of the code on my form?
Dim objXl As Excel.Application
Dim objWkb As Excel.Workbook
Dim objSht As Excel.Worksheet
Set objXl = New Excel.Application
With objXl
.Visible = False
Set objWkb = .Workbooks.Open("f:\forecast\proposal\" & Me.Proposal & ".xls"
.Range("Document"
.Range("became"
.Range("propno"
.Range("H4"
objWkb.SaveAs ("f:\forecast\proposal\" & Me.Proposal & ".xls"
objWkb.PrintOut
objWkb.Close
End With