Hi,
I am attempting to return specified characters from a string variable. The variable is called in session form from Active Directory - session("linemanager"
CN=firstname.lastname,OU=Galwally and Local Offices,OU=Users,OU=InvestNI Users and Computers,DC=investni,DC=internal
I want to pull out the firstname.lastname part only out of the text string and have attempted to do so with code similar to below;
Function FnCleanString(pString)
Dim tString
Dim tLength
Dim lCtr
tString = session("linemanager"
tLength = Len(pString)
For lCtr = 1 To tLength
If Mid(pString, lCtr, 1) <> " " Then
tString = tString & Mid(pString, lCtr, 1)
End If
Next lCtr
FnCleanString = tString
End Function
I'm making a plead for help because I'm getting error messages all over no matter what code I attempt.
Any assistance you could provide would be mucho appreciated.
Tazzer