Error exporting data to excel for second time

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é
 
S

strive4peace

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top