VBA Runtime Error

G

Guest

I am running a module in Access that exports data to Excel. When I ran this
DB on Windows 2000, I had no errors.

After switching to Windows XP, I get an error that debugs to the VBA code in
Access.

Once the macros is running, the Excel spread sheet opens. If I click on
another tab in the worksheet I get this error in my Acess VBA:

Run-time error '50290':
Application-defined or object-defined error

I am not sure where this problem stems from: Access, Excel, VBA or Windows
XP.

Any advice would be greatly appreciated!

Thanks in Advance,
Elena
 
G

Guest

I have not tested this, but I think the problem is that by clicking on a
different tab you have changed the active object from what your code was
working on. Unless there is an overriding reason, I would suggest that you
leave the Excel Application Object invisible while your code is manipulating
it and only make it visible as you exit your module.
 

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