troubleshooting Question

How to create delay of VBA code execution

Avatar of Dale James
Dale James asked on
Microsoft AccessCitrixVBA
7 Comments2 Solutions92 ViewsLast Modified:
Hello Team

I have been running a reports automation from MS Access. Nothing to complicated, just using access to open up particular files in Excel, delete specific detail and then transferring query detail back to Excel.

This process has been working fine for quite sometime but recently there has been a system update within the Citrix operating system and since the update my automation has been crashing when it gets to the DoCmd. TransferSpreadsheet method.

What I have discovered is, if I step through the code one line at at time or even apply a break before the  DoCmd. TransferSpreadsheet methods are reached, the code will continue to be processed without any issues.

From this observation, I am beginning to think that it may be a delay occurring within the Citrix environment as the only difference as far as I am aware of is the speed at which the code is processed in comparison to the step code execution and the event trigger code execution.

If the issue is due to the speed at which the code is being processed or attempting to be processed from the trigger event, can anyone suggest what would be the best way to create a delay in the processing of the code before it reaches the TransferSpreadsheet method as it's as though extra time is needed before the TransferSpreadsheet code is executed.

Thanks in advance.

John Tsioumpris
IT Supervisor
Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros