-
converting problems
I need to convert a string into double to use it in a search expression.
The problem is that I must use the European settings (, as decimal symbol) and VB uses always the VS settings. But if I try to convert the string to double (with cdbl() ) he uses the European settings ("41,2" is converted to 41,2 and not 41.2), which gives an error in the search string ( comma in expression).
Can anyone help me with this?
-
Re: converting problems
Hi!
I have solved this problem with following code:
dim myStr$, myPos%
myStr = "12,3" 'This is your number
myPos = Instr(1,myStr,",")
mid(myStr,myPos,1) = "." 'This converts "," to "."
'Now myStr is "12.3"
Pasi Salminen
[email protected]