3 replies
by rboyer1 Accepted solution
by tmalo627 Accepted solution
by slayer_ Accepted solution
: mark line breaks
'Middle name
dim name:
dim posF:
dim posL:
dim mName:
name="John Dun Doe":
name=trim(name):
posF = InStr(1, name, " "):
posL = InStrRev(name, " "):
If posF=posL then:
mName="":
else:
mName = Mid(name, posF + 1, Len(name) - posF - (Len(name) - posL + 1)):
end if:
mName=left(mName,1):
vReturnVal=mName:
'First Name
dim name:
dim posF:
dim posL:
dim fName:
name="John Dun Doe":
name=trim(name):
posF = InStr(1, name, " "):
fName=left(name,posF):
vReturnVal=fName:
Set C32Ext = Nothing:
'Last Name
dim name:
dim posL:
dim lName:
name="John Dun Doe":
name=trim(name):
posL = InStrRev(name," "):
lName=right(name,Len(name)-posL):
vReturnVal=lName:
This discussion is closed to new replies.
Trending Software posts
Sort by Trending