2

I'm using Invantive Control for Excel to create an Exact Online report.

I'm changing some of the values of this report with VBA in Microsoft Excel, upon which the query is based.

So I'd like to be able to trigger the download function of the synchronize button with a VBA command. How would I do this?

Goombah
  • 370

1 Answers1

3

Yes, it is possible. In order to synchronize the workbook you need to call:

  • I_SYNC_UPLOAD if you just want to upload data to your database or service;
  • I_SYNC_DOWNLOAD if you just want to download data from your database or service;
  • I_SYNC_ALL if you want to do both of the above: first I_SYNC_UPLOAD, if successful I_SYNC_DOWNLOAD.

To sum up the steps you need to perform in order to get thing working from begin to end:

  • Enable the Invantive model from the Modeler tab;
  • Set the model in edit mode using the Edit mode button in the same tab;
  • Open the Developer tab and click Insert then select the first item Button (Form Control);
  • Draw a button at a place at your disposal;
  • The Assign Macro dialog opens automatically. Click New there. This opens the Visual Basic for Applications editor;
  • In the menu bar, choose Tools and then the menu item References. Make sure that InvantiveControlUDFs is checked. Click OK;
  • Now in your Sub, place the code as mentioned above, such as:

    Sub Button1_Click()
        I_SYNC_DOWNLOAD
    End Sub