جرب كدة ................
Sub test2()
Dim acPath As String
Dim ObjExcelAppl As Excel.Application
Dim objWorkbook As Excel.Workbooks
Dim lastrow As Long
Set ObjExcelAppl = CreateObject("Excel.Application")
Set objWorkbook = ObjExcelAppl.Workbooks
DoCmd.DeleteObject acTable, "daybox"
'DoCmd.Hourglass True
acPath = CurrentProject.Path
objWorkbook.Open acPath & "\data22.xlsb"
ObjExcelAppl.DisplayAlerts = False
'DoEvents
ObjExcelAppl.Visible = True
Sleep (3000)
lastrow = Sheets("الارصدة").Cells(Rows.Count, 1).End(xlUp).Row
DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel12, "daybox", CurrentProject.Path & "\data22.xlsb", False, "الارصدة!A3:I" & lastrow
objWorkbook.Close
ObjExcelAppl.Quit
Set objWorkbook = Nothing
Set ObjExcelAppl = Nothing
'DoCmd.Hourglass False
End Sub