Or to generalize shakespeare5677's excellent solution:
x = ConvertToNumber("1234567", 2)
Function ConvertToNumber(strNum, nDecDigits)
ConvertToNumber = Val(Left(strNum, Len(strNum) - nDecDigits) & "." & Right(strNum, nDecDigits))
End Function
[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]