How to find duplicate character in string

Dim objStr

Dim objArray

Dim objchar

objStr = Inputbox(“Enter a String having some duplicate characters in it – as e.g. aacanddoodd”)

objchar= Inputbox(“Input the character you want to find which is duplicated or not as e.g. a or d or o”)

objArray=split(objStr,objchar)

print ubound(objArray)