I am an intraday stock trader using excel to manage my positions in real time and use a java application provided by external vendor for executing the trades manually. I run excel in automatic mode so that it refreshes and fetches data in real time.
I have to switch from excel to the java application and vice versa several times during the day. I face an issue of 4-5 second lag when I switch from java app to excel because excel is running in automatic mode and takes a few seconds to refresh. This is reducing my efficiency.
To overcome this, I want to make excel calculation mode manual before I switch to external java application. So that when I return back from java application, I do not face this lag. I have been able to do this using a macro with a shortcut I have defined (Ctrl+L):
Application.Calculation=xlCalculationManual
Application.SendKeys("%{TAB}")
The above replicates Alt+Tab and helps calculation mode become manual before switching to java app.
This is the issue I face: when I return back to excel using Alt+Tab, I have to further press Alt+MXA to make calculation automatic.
Thus, it is leading to a lot of button clicks: Ctrl+L and then Alt+Tab followed by Alt MXA. Even if I use a smaller shortcut, say Ctrl+A using macro to replicate Alt MXA, still I have to press Alt+Tab followed by Ctrl+A.
I need help on a faster way to do this. E.g. is there a predefined event which can detect control returning to excel so that calculation mode can become automatic seamlessly. Thanks.
I have to switch from excel to the java application and vice versa several times during the day. I face an issue of 4-5 second lag when I switch from java app to excel because excel is running in automatic mode and takes a few seconds to refresh. This is reducing my efficiency.
To overcome this, I want to make excel calculation mode manual before I switch to external java application. So that when I return back from java application, I do not face this lag. I have been able to do this using a macro with a shortcut I have defined (Ctrl+L):
Application.Calculation=xlCalculationManual
Application.SendKeys("%{TAB}")
The above replicates Alt+Tab and helps calculation mode become manual before switching to java app.
This is the issue I face: when I return back to excel using Alt+Tab, I have to further press Alt+MXA to make calculation automatic.
Thus, it is leading to a lot of button clicks: Ctrl+L and then Alt+Tab followed by Alt MXA. Even if I use a smaller shortcut, say Ctrl+A using macro to replicate Alt MXA, still I have to press Alt+Tab followed by Ctrl+A.
I need help on a faster way to do this. E.g. is there a predefined event which can detect control returning to excel so that calculation mode can become automatic seamlessly. Thanks.