Hi,
try to check actual error description, perhaps it will give an idea what
going wrong:
MsgBox "Please ensure that you have not already got MoIncident.xls open,
Err: " & err.description

Signature
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> Hi this module to export a query to Excel works Access/Excel 2000 but
> not with Access/Excel 2003. The Module comes up with the error handler
[quoted text clipped - 37 lines]
>
> End Sub
paul.brown@dayzim.com - 16 Nov 2006 15:45 GMT
Hi
With error handling commented out get the error message
run-time error 2220
Microsoft accesss cant open the file
h:\SaftyAuditDB\MoIncident.xls
Someone suggested that it was permissions, however I am an
Administrator, H is my home drive and as stated it works with access
2000 so I dont see why this should be the case.
Any advice appreciated.
Paul
> Hi,
> try to check actual error description, perhaps it will give an idea what
[quoted text clipped - 51 lines]
> >
> > End Sub
Klatuu - 16 Nov 2006 16:09 GMT
It may be a timing issue. Once the TransferSpreadsheet is initiated, it
immediately tries to open the spreadsheet. It could be that Windows has not
had time to complete writing the data to the spreadsheet and releasing it.
In any case, I would recommend you replace the code where you open the
spreadsheet for the user with a Shell function.
> Hi
>
[quoted text clipped - 67 lines]
> > >
> > > End Sub