Have you tried naming the tab 'testrange' and seeing what happens then?
Also, I will post up a code I use personally to transfer my data from Access into Excel. Its a pretty big example, and does a lot more than just transfer the data, but you might find some of the portions of it useful.
CODE
Private Sub Command0_Click()
cmbTeam.SetFocus
If MsgBox("Begin building and printing new Qualified Activity Matrix for " & cmbTeam.Text & " Team?", vbQuestion + vbYesNo) <> vbYes Then
MsgBox ("Action cancelled.")
'do nothing
Else
MsgBox ("Program will open the Excel file, update it, close it, and then print. This may take some time. Please be patient and wait for Excel file to close and print. Click OK to begin.")
Dim lngColumn As Long
Dim xlx As Object, xlw As Object, xls As Object, xlc As Object
Dim dbs As DAO.Database
Dim rsT As DAO.Recordset
Dim blnEXCEL As Boolean, blnHeaderRow As Boolean
blnEXCEL = False
' Replace True with False if you do not want the first row of
' the worksheet to be a header row (the names of the fields
' from the recordset)
blnHeaderRow = True
' Establish an EXCEL application object
On Error Resume Next
Set xlx = GetObject(, "Excel.Application")
If Err.number <> 0 Then
Set xlx = CreateObject("Excel.Application")
blnEXCEL = True
End If
Err.Clear
On Error GoTo 0
' Change True to False if you do not want the workbook to be
' visible when the code is running
xlx.Visible = True
' Replace C:\Filename.xls with the actual path and filename
' of the EXCEL file into which you will write the data
Set xlw = xlx.Workbooks.Open(Application.CurrentProject.Path & "\SOP\91-" & cmbTeam.Value & ".xls")
' Replace WorksheetName with the actual name of the worksheet
' in the EXCEL file
' (note that the worksheet must already be in the EXCEL file)
Set xls = xlw.Worksheets("Main")
Dim rs As Recordset, db As Database
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT ID, [Effective Date] AS [EDATE], FORMAT(ID, '0000') AS [ID1], FORMAT(Acct, '0000') AS [ACCT1], FORMAT(CC, '0000') AS [CC1], FORMAT(DT, '00') AS [DT1], FORMAT(SP, '00') AS [SP1], FORMAT(GP, '00') AS [GP1], Title, Version FROM Documents WHERE ID=91")
xlw.Worksheets("Main").PageSetup.RightHeader = rs.Fields("Title")
xlw.Worksheets("Main").PageSetup.LeftFooter = rs.Fields("ACCT1") & "-" & rs.Fields("CC1") & "-" & rs.Fields("DT1") & "-" & rs.Fields("GP1") & "-" & rs.Fields("SP1") & "-" & rs.Fields("ID1")
xlw.Worksheets("Main").PageSetup.CenterFooter = "Rev: " & rs.Fields("Version")
xlw.Worksheets("Main").PageSetup.RightFooter = "Effective Date: " & rs.Fields("EDATE")
' Replace A1 with the cell reference into which the first data value
' is to be written
Set xlc = xls.Range("A1") ' this is the first cell into which data go
Set dbs = CurrentDb()
Dim srcQ As String
srcQ = "TRANSFORM Format(First(srcSOP91.Date),'MM/YY') AS FirstOfDate SELECT srcSOP91.Warehouse, srcSOP91.HireDate FROM srcSOP91 WHERE (((srcSOP91.TeamID)=" & cmbTeam.Value & ")) GROUP BY srcSOP91.Warehouse, srcSOP91.HireDate, srcSOP91.TeamID PIVOT srcSOP91.Title;"
' Replace QueryOrTableName with the real name of the table or query
' whose data are to be written into the worksheet
Set rsT = dbs.OpenRecordset(srcQ, dbOpenDynaset, dbReadOnly)
If rsT.EOF = False And rsT.BOF = False Then
rsT.MoveFirst
If blnHeaderRow = True Then
For lngColumn = 0 To rsT.Fields.Count - 1
xlc.Offset(0, lngColumn).Value = rsT.Fields(lngColumn).name
Next lngColumn
Set xlc = xlc.Offset(1, 0)
End If
' write data to worksheet
End If
Workbooks(1).Worksheets("Main").Cells(2, 1).CopyFromRecordset rsT
rsT.Close
Set rsT = Nothing
dbs.Close
Set dbs = Nothing
' Close the EXCEL file while saving the file, and clean up the EXCEL objects
Set xlc = Nothing
Set xls = Nothing
xlw.Close True ' close the EXCEL file and save the new data
Set xlw = Nothing
If blnEXCEL = True Then xlx.Quit
Set xlx = Nothing
Dim objXLApp As Excel.Application
Dim objXLBook As Excel.Workbook
Workbooks.Open (Application.CurrentProject.Path & "\SOP\91-" & cmbTeam.Value & ".xls")
Excel.Application.DisplayAlerts = False
ActiveWorkbook.PrintOut Copies:=1, Collate:=True
ActiveWorkbook.Close False
Excel.Application.Quit
MsgBox ("Editing and printing complete.")
End If
You may also find this useful:
Access MVP: KDSnellKDSnell has some excellent information regarding transfering to excel.