I will try to keep this as simple as possible and not dive into the complexities of the code. I have a code that generates shapes, each shape with the same assigned macro. The macro calls a code that gets the shapes name, and cross references a list to find that name and pull data from that list to activex controls. Depending on the shape you click, a different set of data is pulled into the activex controls. Everything functions perfectly and generally very quick.
Here is my problem:
When I am not actively using the computer for a few minutes and then click one of the shapes, I get the excel loading cursor for sometimes close to 3 seconds before that shape is selected and all of the information is populated into the activex controls. After waiting long for the first click, it is fine and it then performs all subsequent clicks quite fast. Generally the loading cursor flashes for a fraction of a second and the entire process is completed in about 0.2 to 0.4 seconds. What leaves me confused is that when stepping through the code, the entire code still runs within the short 0.2 second window. It is after the sub is completed, that excel gets stuck. I have to think at this point that it is not the code, but something with excel reloading as the active application.
Furthermore, I have a windows 10 computer but it appears that this problem does not happen on a windows 7 computer.
You may ask why waiting 3 seconds is a problem, but I am generally running this code while presenting in a meeting, and waiting more than a second is not an option.
Thank you for your help.
Here is my problem:
When I am not actively using the computer for a few minutes and then click one of the shapes, I get the excel loading cursor for sometimes close to 3 seconds before that shape is selected and all of the information is populated into the activex controls. After waiting long for the first click, it is fine and it then performs all subsequent clicks quite fast. Generally the loading cursor flashes for a fraction of a second and the entire process is completed in about 0.2 to 0.4 seconds. What leaves me confused is that when stepping through the code, the entire code still runs within the short 0.2 second window. It is after the sub is completed, that excel gets stuck. I have to think at this point that it is not the code, but something with excel reloading as the active application.
Furthermore, I have a windows 10 computer but it appears that this problem does not happen on a windows 7 computer.
You may ask why waiting 3 seconds is a problem, but I am generally running this code while presenting in a meeting, and waiting more than a second is not an option.
Thank you for your help.