Deriscope VBA


Deriscope supports Visual Basic.
Any function from the list shown further below may be inserted in a Visual Basic code in order to access Deriscope from within VBA.
All Deriscope functions return TRUE on success and FALSE on failure.
Upon failure, by default a diagnostic message is returned, but it is possible to suppress that message by running the function
SetSilentMode
Because it is possible that a Deriscope function does not run at all - for example if it is called with a wrong number of parameters - is a good practice to always verify that it has returned TRUE (see example code below)

The following 2 lines should be inserted at the very top of the VBA module so that they run before any Deriscope functions are called:

Dim addin As COMAddIn
Dim adxModule As Object

The following 2 lines should be inserted in the VBA code of your custom subroutine or function so that they run before any Deriscope functions are called:

Set addin = Application.COMAddIns.Item("DeriscopeGui.AddinModule")
Set adxModule = addin.Object

Next you may call a Deriscope function named XYZ that takes as input the arguments a1, a2, ... as follows:

adxModule.XYZ a1, a2, ...

If XYZ takes no arguments, the line simplifies to:

adxModule.XYZ

As mentioned above, it is recommended that you check the returned boolean, in which case your code would look similar to this one:

Dim b as Boolean
b = False 'do this setting to False always before calling the XYZ function
b = adxModule.XYZ(a1, a2, ...)
  If Not b Then
'... custom code here to handle the failed call properly
End If

Below is the complete list of all VBA exported functions.
Download the workbook
vba.xlsm for examples of their actual usage.

CheckLiveFeedsCredentials
ConfigureLiveFeeds
ForceRecalc
GetTradeDate
HideWizard
IsAutoRefresh
IsDeriscopeAnalyticsLoaded
IsDeriscopeWizardEnabled
IsFlash
LoadDeriscope
MinimizeWizard
QuitWizard
SetAutoCalc
SetAutoRefresh
SetFlash
SetFlashDuration
SetManualCalc
SetSilentMode
SetTimeOut
SetTradeDate
StartLiveFeeds
StopAllLiveFeeds
StopLiveFeeds
ToggleFlash
TutorialsAndWarnings
UseWizard