VBA - Application.Evaluate() Bug?

DMcDaniel

New Member
Joined
Aug 8, 2022
Messages
2
Office Version
  1. 2016
I think I ran into a bug with vba. For whatever reason the number 13, while tests true for IsNumeric(), is not able to be evaluated with the Application.Evalutate() function
I know this seems redundant but I am pulling fractional inches IE: "61 11/16 in" removing units and spitting out 61.6875. when "13 in" came though it errors out
Some test code to demonstrate what I am talking about. running this in a test module will error out.

For the time being I will find a work around for this but I am more curious as to what's going on in the code to cause this error
replacing 13 with any other integer or fractional number works just fine. "12 2/2" even spits out 13 with no issues

Im currently on office 2016

VBA Code:
    Dim str As String
    str = "13"

    Debug.Print IsNumeric(str)
    Debug.Print Application.Evaluate(str)
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Thanks for checking!,
I'll do some digging on my end. maybe there an update I'm missing or something
 
Upvote 0

Forum statistics

Threads
1,214,896
Messages
6,122,132
Members
449,066
Latest member
Andyg666

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top