Using square brackets for string evaluation, I am trying to make [inputString]
return 320
.
Any ideas how to do it?
Public Sub TestMe()
Dim inputString As String
inputString = "20+300"
Debug.Print Application.Evaluate(inputString) 'ok
Debug.Print Evaluate([inputString]) 'ok
Debug.Print [20+300] 'ok
Debug.Print ["20"+"300"] 'ok
Debug.Print ["20"+300] 'ok
Debug.Print [inputString] 'returns "20+300" and not 320
End Sub