this is my code..
Sub Debit_Notes()
Dim xlApp As Excel.Application
Dim xlwkbk As Excel.Workbook
Dim xlsheet As Excel.Worksheet
Dim objRST As Recordset
Dim rec As Recordset
Dim RsCntry As Recordset
Dim lvlColumn As Integer
Dim i As Integer
Dim f As Variant
Dim startrange As Excel.Range
Dim lngColumn As Long
Dim r As Long
Dim CrRow As Long
Dim lngRows As Long
Dim lngCols As Long
Dim icols As Integer
Dim c As Object
Dim firstAddress As Variant
Dim w As Object
Dim rsweek As Recordset
Dim LastRow As Long
Dim NewCell As Range
'Create Sheets of Working Tables
Set rsweek = CurrentDb.OpenRecordset("Select week from week;")
Set rec = Application.CurrentDb.OpenRecordset("SELECT * FROM TDDebitNotes;")
Set RsCntry = CurrentDb.OpenRecordset("SELECT * FROM TD_DB3;")
While Not (rec.EOF)
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.DisplayAlerts = False
Set xlwkbk = xlApp.Workbooks.Open("C:\Input Files\DNote.xlt")
Set objRST = CurrentDb.OpenRecordset("SELECT TYPE,Org,FACCT,CSUB,P_S,SOBP,FPROJ,Cust,Cntry,iet,orgo,schan,Loc,bsac FROM " & rec!SOBPDEBIT & " ;")
xlApp.ActiveSheet.Range("A30").CopyFromRecordset objRST
xlApp.ActiveSheet.Range("C3").Value = RsCntry!Description
xlApp.ActiveSheet.Range("K8").Value = RsCntry!SOBP
xlApp.ActiveSheet.Range("K9").Value = RsCntry!Description
xlApp.ActiveSheet.Range("M4").Value = Format(Date, "DD/MM/YYYY")
xlApp.ActiveSheet.Range("B8").Value = rec!Description
xlApp.ActiveSheet.Range("B9").Value = rec!SOBP & " - " & rec!Prefix
xlApp.ActiveSheet.Range("C18").Value = "PSA CHARGES" & " - " & rsweek!Week
xlApp.ActiveSheet.Range("C25").Value = Format(Date, "MM/YYYY")
xlApp.ActiveSheet.Cells.LastRow
LastRow = Cells(65536, 1).End(xlUp).Row
Set NewCell = Range("A" & LastRow + 2)
NewCell.Value = 444444444 (here am just checking where is the located cell)
LastRow = 0
'Add second part of Debit Note
xlApp.Sheets("Sheet2").Select
xlApp.ActiveSheet.Range("A1:N27").Select
xlApp.Selection.Copy
xlApp.Sheets("Sheet1").Select
xlApp.ActiveSheet.Range("A45").Select
xlApp.ActiveSheet.Paste
xlApp.Sheets("Sheet2").Select
xlApp.ActiveWindow.SelectedSheets.Delete
xlApp.ActiveSheet.Name = "DN" & " - " & rec!SOBP
xlwkbk.Save
xlApp.DisplayAlerts = True
xlApp.ActiveWorkbook.SaveAs FileName:="C:\Output FIles\TD\TD Debit Notes\D.N. " & Format(Date, "DDMMYYYY") & " FROM " & rec!Prefix & " TO " & RsCntry!Prefix & " .xls"
xlApp.quit
rec.MoveNext
Wend
Set xlApp = Nothing
Set xlwkbk = Nothing
Set xlsheet = Nothing
End Sub