Re: I am in need of desperate help with this visual basic prob
Try this:
Dim n As String
Dim location As Integer,lenOfString As Integer
Dim DecimalLeft As Integer, DecimalRight As Integer
n = "1.234567"
lenOfString = Len(n)
location = InStr(n, ".") 'returns the position of decimal point
DecimalLeft = location - 1
DecimalRight = (lenOfString - DecimalLeft) - 1
MsgBox DecimalLeft & ", " & DecimalRight
Hope this helps.