Courtesy of Doug Steele, mvp, I found below Function which works great. It returns the position of the first capital letter in the string.
However, I want it to return the first capital letter and not its position. Can you please tell me what I need to change in this Function?
Function FirstCapital(InputString As String) As Long
' returns 0 if no capital found
Dim lngFirstCapital As Long
Dim lngLoop As Long
Dim strCurrChar As String
lngFirstCapital = 0
For lngLoop = 1 To Len(InputString)
strCurrChar = Mid$(InputString, lngLoop, 1)
If Asc(strCurrChar) >= 65 And _
Asc(strCurrChar) <= 90 Then
lngFirstCapital = lngLoop
Exit For
End If
Next lngLoop
FirstCapital = lngFirstCapital
End Function