ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Slow running of Excel macros embedded in an ActiveX (https://www.excelbanter.com/excel-programming/324706-slow-running-excel-macros-embedded-activex.html)

Philip Kinchington

Slow running of Excel macros embedded in an ActiveX
 
Can anyone point me in the direction of a handy resource/webpage that
can help me with my problem?

I have developed a reporting system based within Wonderware's InTouch
SCADA package. On one of my screens I have a an iexplore ActiveX object
which I use to open some Excel spreadsheets (different ones for
different reports.) Wonderware allows me to send macro commands to the
embedded spreadsheet via DDE. For instance I have a button which runs a
macro to print the active worksheet which consists simply of the one-liner:

ActiveSheet.PrintOut

This works, however the command takes over 20 seconds to run, and during
that time the system is locked up. From some of the more complex macros
I have (one takes a copy of the template report, updates all of the
data, and then makes a copy with a filename derived from data stored a
hidden "Data" worksheet) it seems that it is not the macro as a whole
that is running slowly, but certain parts of it. The reports gather data
from a SQL Server running on the local machine via VBA code within the
macros, and via DDE links to InTouch and an OPC server of the form
'=Application|Topic!Item'. Both of these seem to run very fast, it is
the save and print operations that seem to cause the most problems.

Is there anyway of speeding this up? or is it as I suspect, that I am
asking too much in DDE-ing commands to what seems to me to be an ActiveX
spreadsheet running within an ActiveX Internet Explorer object?

Any help will be greatly appreciated. Thanks.


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com