09-14-2006 04:20 AM
09-14-2006 05:40 AM
I guess the problem is the decimalsign (dot / comma)
Try this little function
Option Explicit
msgbox GroupPropGet(GroupIndexGet("groupname") ,"X")
msgbox CStr(GroupPropGet(GroupIndexGet("groupname") ,"X"))
msgbox StringToFloat(CStr(GroupPropGet(GroupIndexGet("groupname") ,"X")))
'''Function to convert a string to a float value
Function StringToFloat(sInput)
Dim sDecimalCharacter
Dim sTempValue
If IsNumeric(sInput) Then
'Determine the decimalsign (which depends on the regional settings)
sDecimalCharacter = Mid(1.1, 2, 1)
If Instr(sInput, ".") > 0 Then
sTempValue = Replace(sInput, ".", sDecimalCharacter)
Else
sTempValue = Replace(sInput, ",", sDecimalCharacter)
End if
StringToFloat = CDbl(sTempValue)
Else
StringToFloat = Null
End If
End Function
09-14-2006 05:56 AM