The bit where there's a letter at the start of every variable. It's not necessary and is a fucking stupid way of writing code (in any language).
Anyway, what I was saying was try this:
code:
Sub SearchNReplace1()
Dim CurrentCell As Range
For Each CurrentCell In Selection
CurrentCell.Value = "XXX"
Next
End Sub
(making sure you have a backup first, just in case)
If that doesn't work then you've got something small to work with, if it does work then add back lines to reproduce original behaviour until it breaks again.