Reposting: How to avoid macro cancelling an export?

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

Guest

Hello:

I have a macro that runs a module to export a query as a .csv. Before the
export can complete, an error is posted which says in effect, "You have hit
the cancel button". I obviously did not. Is is possible that the "close"
action in the macro is truncating the export and not allowing it to have
enough time to complete?

Thanks, G
 
G,

What does the Close action relate to? What are the actions in the
macro? I assume you are using a TransferText action to do the export?
How long does the export really take?
 
Hi Steve:

Prior to this close action, the macro:
exports the csv by opening/running an Access module that does this, AND then
renames xls tabs by opening/running an Access module that does this (by
calling a module in the xls file.)

Then there is a close action to close the macro.

The "transferx" commands were giving me troubles in the beginning so I
switched to modules for the export.

The interesting thing is as a workaround, I've split out the two pieces
above into their own respective macros, and they run just fine, although now
I get a "you can't close the access file yet..." message. The export process
takes a few seconds; the rename tabs process takes a ~minute guesstimate.
They are kicked off by their own respective scheduled tasks now too. ...but
it would be nice to have them all together in a single macro.

I don't expect you to trouble shoot this, but was wondering if there is
something known about either of these processes that could generate a "you've
hit the cancel buton" error.

'appreciate your thoughts~

~G
 
Back
Top