Hi all,
The error message above is getting thrown up in the following code:
Set rs2 = db.OpenRecordset("TblDefMailshot"
Set XL = CreateObject("Excel.Application"
Set wb = XL.Workbooks.Add
Set ws = wb.Worksheets.Add
For i = 0 To rs2.Fields.Count - 1
ws.Cells(1, i + 1) = rs2.Fields(i).Name
Next i
ws.Range("A2"
.CopyFromRecordset rs2
Set rs2 = Nothing
It's the copyfromrecordset line that's causing the problem but it's only happening on one computer, it works fine on others. This has got to be with a client tomorrow and i can't let this same error appear on their system so can anyone please shed some light on this.
Thanks a lot
The error message above is getting thrown up in the following code:
Set rs2 = db.OpenRecordset("TblDefMailshot"
Set XL = CreateObject("Excel.Application"
Set wb = XL.Workbooks.Add
Set ws = wb.Worksheets.Add
For i = 0 To rs2.Fields.Count - 1
ws.Cells(1, i + 1) = rs2.Fields(i).Name
Next i
ws.Range("A2"
Set rs2 = Nothing
It's the copyfromrecordset line that's causing the problem but it's only happening on one computer, it works fine on others. This has got to be with a client tomorrow and i can't let this same error appear on their system so can anyone please shed some light on this.
Thanks a lot