Q:

String Fraction to Value in VBA

How can fraction as a string be converted to a numeric value?
strFrac = "3/2"

Currently doing by splitting string to get numerator and denominator.
Dim x() As String
x = Split(strFrac, "/")

Then using Val() and dividing.
v = Val(x(0)) / Val(x(1))

result: v = 1.5
Is there a more direct approach?  Would be nice if something like Val("3/2") would work.

A:

Val doesn't really convert a string into a numeric. It stops reading a string when it encounters a non-numeric character, and returns a Double representing the numeric value extracted from the string.
That "works" for your purposes, but the CDbl conversion function would be more appropriate.
If you're in Excel, Scott's answer leverages Excel's computing engine to literally Evaluate the string, which is what you're looking for. A side-effect of that is that the string can now contain Excel functions and cell references, and the result will still get evaluated.
If the evaluation returns an error value (e.g. Evaluate("12/0")), then you'll run into type issues if you assign the result directly to a Double. Instead, assign the result to a Variant, and validate that it's not returning an error using the IsError function - that will spare you from run-time error 13 / "type mismatch".
If you're not in Excel, you can't do that - and you don't want to reference the Excel object model just for that either - so your solution is indeed the simplest.

