DougInCanada
Technical User
I have a script for creating user accounts which makes the first letter of a name uppercase and the rest lowercase:
However, we actually have a situation where a user has not only a hypenated name, but that hypenated name also contains an apostrophe
(lastname = Hoffa-O'Reilly)
I'm looking to add code to my script that will allow me to not only change the 'H' to an uppercase, but also the letters before and after the apostrophe ('O' & 'R') and I'm not quite sure how to go about it....
Code:
intLastName = Len(strLastName)
strFirstLetter = UCase(Left(strLastName, 1))
strRemainingLetters = LCase(Right(strLastName, intLastName - 1))
strLastName = strFirstLetter & strRemainingLetters
However, we actually have a situation where a user has not only a hypenated name, but that hypenated name also contains an apostrophe
(lastname = Hoffa-O'Reilly)
I'm looking to add code to my script that will allow me to not only change the 'H' to an uppercase, but also the letters before and after the apostrophe ('O' & 'R') and I'm not quite sure how to go about it....