question

Upvotes
Accepted
1 0 0 1

Refresh DSGRID functions in excel from VBA sub and wait for refresh to be finished before continuing with the code execution

Dear all,

We have developed a portfolio optimisation code that runs with VBA over one excel file that is in practice a support database.

The code loops through several non linear weighting scenarios to arrive to an optimum portfolio configuration.

During these processes the system does not need to refresh data from DS as an initial download is made before running the code.

But once the stock selection is finished, we need to update several DSGRID cells related to the selected stocks before continuing some further code lines.

We are currently using this instruction for the intermediate refresh:

Application.COMAddIns("PowerlinkCOMAddIn.COMAddIn").Object.RefreshActiveWorkbook

Despite it seems to be working, we do not know why or if other instructions would be better

We have used other instructions

Application.Run "PLRefreshWorkbookEventHandler"

And

Application.Run "EikonRefreshWorkbook"

The problem is that we are not sure which is the proper refresh system as we need synchronous refresh (sequential), meaning the VBA code temporarily stops execution until all refreshes are finished.

could you help us to clarify this issue?

Thank you very much in advance

Ivan

eikon-com-apidatastream-apidsws-apivba
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
681 2 2 1

Hi, This is regarding the the excel addin and not DSWS the API. You can raise these requests over the helpdesk. In the meantime for your reference datastream-dfo-vba-commands-vs4.pdf may help

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea