The latest MS Office update has disabled vbscript which I am using in Excel VBA to evaluate expressions. I have found this to be substantially faster than the VBA "Evaluate" function in the past so want to avoid doing that.
Javascript still works so I am trying to migrate to that. However some of our more complex expressions, which use powers or square roots, do not work without re-writing the expressions to use Math.Pow() etc.
So my question is if I can run a javascript which evaluates a vbscript expression.
Example of what I am doing currently as follows:
Sub TestVBScript()
Dim objscript As New ScriptControl
Dim var As Variant
Dim str As String
objscript.Language = "vbscript"
str = "2+2"
var = objscript.Eval(str)
MsgBox str & " = " & var
End Sub
What I want is something which evaluates the vbscript expression but using javascript, thereby bypassing the MS Office bug.
Here is information about the MS Office update issue in case anyone interested. I think likely to be a big problem for a lot of people: https://social.msdn.microsoft.com/Forums/en-US/45c14333-3685-4b2d-9a3a-6a109a5a2a86/access-2016-microsoft-script-control-stopped-working-error-380?forum=accessdev
Thank you for your help!