Error exporting data to excel for second time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I made a database that exports certain data to an excel template, using a
button on a form. This works fine if I only export the data once. If I want
to export it for the second time, the runtime error 9 (suscript out of range)
occurs. I have to close the previous excel file made and sometimes even the
database to make it work again.

Does anyone know what causes this error and, more important, how can I solve
it?

Thanks
René
 
Hi Rene,

are you releasing your object variables when your code is done?

if that isn't it, can you post the code you are using?

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
 
Back
Top