Hello again!
I'm getting the "Unable to set FormulaArray property of the Range class" error after runing the following code:
I'm using the spanish version of Excel 2007 and the decimal separator here is the comma and not the dot. Is there a way, over VBA, to make this comparison?
I'm getting the "Unable to set FormulaArray property of the Range class" error after runing the following code:
Code:
Sub test()
Range("A1").Value = "05/05/1987 21:00:00"
Dim timeCompare As Date
timeCompare = Format("20:00:00", "hh:mm:ss;@")
Range("A2").FormulaArray = "=MOD(A1,1)"
Range("A3").FormulaArray = _
"=IF(MOD(A1,1) >= " & CDbl(TimeValue(timeCompare)) & ",1,0)"
End Sub