The problem is this:
I am simply exporting into an existing spreadsheet from my access database.
It seems to work okay using the code (below) on my NT machine with 2000 Excel system.
But it doesn't seem to work on another NT machine with 2002 Excel system. It seems to update the calculations but it doesn't seem to save the changes. It will maybe work the first time but after that it just doesn't save any changes?? Also places silly triangle things in some of the boxes saying their the wrong format. I seem to have fixed that problem, but it still just doesn't insert the new records in the spreasheet even though the data modified for the file changes?

Here is the code that i used: Is there a problem with the version or something like that or a better way to do it?>

Private Sub cmdXL_Click()
Dim projtype As String
Dim qry As QueryDef
Dim avgDay As Integer
Dim rs As Recordset
Dim sql1, sql2 As String
Dim dt As Date
Dim dtString
Dim xldb As Database
Dim xlrs, xlrs2 As Recordset
Dim count As Integer
Dim mnt As Integer
Dim sheetName, prevsName As String
Dim sheet As Object
Dim firstTime As Boolean
Dim rowCount As Integer
Dim firstRow As Integer

Set db = CurrentDb()
Set sheet = GetObject("I:\tol\Tool Order Log.xls")
firstTime = False
rowCount = 0
On Error Resume Next
DoCmd.DeleteObject acQuery, "qryXL"
dt = Date
dtString = Format(dt, "mm") & "/" & Format(dt, "dd") & "/" & Format(dt, "yy")
sql1 = "SELECT [Date Received], [Approval Received], [Design_Time_Calculation] FROM [Tool Order Log] WHERE [Die No] <> 0 AND [Tool ordered] = #" & dtString & "#"
sql2 = "SELECT [Tool ordered], [Section No], [Die No], [Press], [Apertures], [Weld plate], [Expansion], [Die], [Porthole], [Backer], [Bolster], [Designer].[Designer], [tblToolmaker].[Toolmaker], [Date due], [Held / Comments], [Backers], [Die Holder], [Bolsters], [Bolster Insert], [Cep / Exp], [Date Approved], [Layout Drawing Status], [CQI Design Status], [Special Requirements], [Speed], [Billet Temperature], [Design_Time_Calculation] FROM [Tool Order Log], [Designer], [tblToolmaker] WHERE [Designer].ID=[Tool Order Log].Designer AND [tblToolmaker].ID=[Tool Order Log].[Toolmaker] AND [Die No] <> 0 AND [Tool ordered] = #" & dtString & "#"
Set rs = db.OpenRecordset(sql1, dbOpenDynaset)
If rs.EOF = False And rs.BOF = False Then
With rs
Do Until .EOF
.Edit
'avgDay = IIf((DateDiff("ww", rs("[Approval received]"), rs("[Date Received]"), 2) < 1) And (DateDiff("ww", rs("[Approval received]"), rs("[Date Received]"), 2) > -1), rs("[Date Received]") - rs("[Approval received]"), (rs("[Date Received]") - rs("[Approval received]")) - DateDiff("ww", rs("[Approval received]"), rs("[Date Received]"), 2) * 2)
!Design_Time_Calculation = avgDay
.Update
.MoveNext
Loop
End With
'DoCmd.RunMacro "Tooling Requisition"
Else: MsgBox "empty"
End If

Select Case (Month(dt))
Case 1
sheetName = "January"
prevsName = "December"
Case 2
sheetName = "February"
prevsName = "January"
Case 3
sheetName = "March"
prevsName = "February"
Case 4
sheetName = "April"
prevsName = "March"
Case 5
sheetName = "May"
prevsName = "April"
Case 6
sheetName = "June"
prevsName = "May"
Case 7
sheetName = "July"
prevsName = "June"
Case 8
sheetName = "August"
prevsName = "July"
Case 9
sheetName = "September"
prevsName = "August"
Case 10
sheetName = "October"
prevsName = "September"
Case 11
sheetName = "November"
prevsName = "October"
Case 12
sheetName = "December"
prevsName = "November"
End Select

Set rs = db.OpenRecordset(sql2, dbOpenDynaset)
Set xldb = OpenDatabase("I:\tol\Tool Order Log.xls", False, False, "Excel 8.0;HDR=No;")
On Error GoTo errExist
Set xlrs = xldb.OpenRecordset(sheetName & "$")
Set xlrs2 = xldb.OpenRecordset(prevsName & "$")
On Error Resume Next
xlrs.MoveLast
firstRow = xlrs.RecordCount
If xlrs.RecordCount = 1 Then
firstTime = True
xlrs.Close
sheet.worksheets(sheetName).Range("A1:AB1").Value = sheet.worksheets(prevsName).Range("A1:AB1").Value
sheet.worksheets(sheetName).Range("A2:AB2").Value = sheet.worksheets(prevsName).Range("A2:AB2").Value
xldb.Close
Set xldb = OpenDatabase("I:\tol\Tool Order Log.xls", False, False, "Excel 8.0;HDR=No;")
Set xlrs = xldb.OpenRecordset(sheetName & "$")
xlrs.MoveLast
End If

Do Until rs.EOF
xlrs.AddNew
xlrs(0) = rs("[Tool ordered]")
xlrs(1) = rs("[Section No]")
xlrs(2) = rs("[Die No]")
xlrs(3) = rs("[Press]")
xlrs(4) = rs("[Apertures]")
xlrs(5) = rs("[Weld Plate]")
xlrs(6) = rs("[Expansion]")
xlrs(7) = rs("[Die]")
xlrs(8) = rs("[Porthole]")
xlrs(9) = rs("[Backer]")
xlrs(10) = rs("[Bolster]")
xlrs(11) = rs("[Designer]") '
xlrs(12) = rs("[Toolmaker]") '
xlrs(13) = rs("[Date Due]")
xlrs(14) = rs("[Held / Comments]") '
xlrs(15) = rs("[Backers]") '
xlrs(16) = rs("[Die Holder]")
xlrs(17) = rs("[Bolsters]")
xlrs(18) = rs("[Bolster Insert]")
xlrs(19) = rs("[Cep / Exp]")
xlrs(20) = rs("[Date Approved]")
xlrs(21) = rs("[Layout Drawing Status]")
xlrs(22) = rs("[CQI Design Status]")
xlrs(23) = rs("[Special Requirements]")
xlrs(24) = rs("[Speed]")
xlrs(25) = rs("[Billet Temperature]")
xlrs(26) = rs("[Die Temp]") '
xlrs(27) = rs("[Design_Time_Calculation]")
xlrs.Update
xlrs.Requery
xlrs.MoveLast
rowCount = rowCount + 1
rs.MoveNext
Loop

If firstTime Then
sheet.worksheets(sheetName).Range("A1:AB1").Font.B old = True
sheet.worksheets(sheetName).Range("A:AB").Horizont alAlignment = -4108 '-4108 = xlCenter
sheet.worksheets(sheetName).Range("A:A:AB:AB").Ent ireColumn.AutoFit
sheet.worksheets(sheetName).Range("A1").RowHeight = 51
sheet.worksheets(sheetName).Range("A2:AB2").Delete
sheet.worksheets(sheetName).Range("N2:N" & firstRow + rowCount).FormulaR1C1 = sheet.worksheets(sheetName).Range("N2:N" & firstRow + rowCount).Value
sheet.Windows("Tool Order Log.xls").Visible = True
sheet.Close vbYes
xldb.Close
firstTime = False
Else
sheet.worksheets(sheetName).Range("A" & firstRow & ":AB" & firstRow + rowCount).HorizontalAlignment = -4108
sheet.Windows("Tool Order Log.xls").Visible = True
sheet.Close vbYes
xldb.Close
End If
Exit Sub
errExist:
MsgBox "There was an error. Please check that the worksheet for the current and previous months exist!", vbInformation
End Sub