If I put a named range at the end of the "transferspreadsheet" line it just overwrites the existing data.
Set objXL = New Excel.Application With objXL Set objWkb = .Workbooks.Open(GetMyPath() & "Call_Offs.xlsm", , , , "password") DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryUpLoadOrders", GetMyPath() & "Call_Offs.xlsm", False objWkb.Save objXL.Visible = True For Each WS In objWkb.Worksheets WS.Visible = xlSheetVisible Next WS objWkb.Worksheets("Loading").Activate AppActivate objXL.Caption Set objWkb = Nothing Set objXL = Nothing End With Exit Sub
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.