It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

News

Log In Sponsors
Partner Sites

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.

Click here to read the whole forum topic

cron