You'll want to check this actually works.  strParent is both the input and the output, with one of them being const.

The .Mid() thus takes a copy ensuring these parameters are different.  Make sure that it actually does what you think it does.