PDA

View Full Version : Solved: Converting Strings to Conditions



nameuser321
03-21-2012, 12:34 PM
I understand that to convert a string to a condition that evalutes to a boolean data type, we can grab a cell and use the formula property, set it to the string, then let it evaluate. My question is, is there a way to do this without having to select an actual cell in your workbook?

Dim arange
Set arange = Range("A1")
arange.Formula = "=10 > 2"

MsgBox arange.Value

Kenneth Hobs
03-21-2012, 12:39 PM
MsgBox Evaluate("=10 > 12")

Bob Phillips
03-21-2012, 12:40 PM
MsgBox Application.Evaluate("=10>2")

nameuser321
03-21-2012, 01:05 PM
wow. yall are good. thanks again!