Is it possible (I would think that it is given the claim of having a complete OLE interface with Excel) to run TradersStudio macros from Excel?
I want to create a Excel interface where I can feed variables to TradersStudio macros from Excel. The logic of the VBA code would be something like:
'Start of code
Misc code to set the appropriate values for variables to use in creating TradersStudio sessions and running the sessions
Activate connection to TradersStudio
In TradersStudio, RunMacroCreateSession (MomSeries, ChildSeries,,,,) where MomSeries and other variables are declared in the Excel code. Obviously I would first code the RunMacroCreateSession macro in TradersStudio to do what I want it to do with the variables provided.
RunMacroSessionAndCreateTxtFile(Param1, Param2), which would run the session just created and where Param1 and Param2 would come from Excel variables. The TradersStudio macro would create a txt file with the results from the session, and the VBA code could then open the txt file for further processing. RunMacroSessionAndCreateTxtFile would be a macro already I created in TradersStudio.
'End of code
I was wondering if anyone had any examples of how to reference TradersStudio in the VBA code to get this to work, similar to how you can control Word or Access from within Excel using VBA code. I am reasonably confident I can get the VBA code to work as long as I know how to establish the TradersStudio connection.
I appreciate any help on this.
Best regards,
tbengtsson |