Why not use Variant ICD that will be valid in both VBA and VBScript:
Function convertValuetoNumeric(ByVal ICD) As Double
If IsNumeric(ICD) Then
convertValuetoNumeric = CDbl(ICD)
Else
convertValuetoNumeric = CDbl(Replace(ICD, "V", "99")) 'Replace V with 99 and convert
End If
End Function
And in the call:
Do Until SampleTable.EOF
If (isCancer(convertValuetoNumeric(SampleTable![Value].Value))) Then
'Some stuff done here
'...
End If
....
I suppose that [Value] is the column name.