Thread: Transform.
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Transform.

Hi
in VBA always the dot is used as separator (regardless of your regional
settings)

--
Regards
Frank Kabel
Frankfurt, Germany


NickHK wrote:
Tom,
Doesn't that depend on the decimal separator ?

Nick

"Tom Ogilvy" wrote in message
...
Just to add to the excellent suggestion.

myVar = " 7.200"
? cdbl(myVar)
7.2

is a good thought, but unless it was a typo, it doesn't quite match
the requested results.

myNewVar = "7200"

perhaps

? cdbl(myvar)*1000
7200

with myNewVar dimensioned as String

--
Regards,
Tom Ogilvy


"Pierre " wrote in message
...
Alternatively, you can use also Cdbl

myvar1 = CDbl(myvar)


---
Message posted from http://www.ExcelForum.com/