Yes it does. But not the way you are assuming it would.
Replace doesn't change strings, it returns a new string with the replacements done: Replace Function (VB6) - VB & VBA in a Nutshell: The Language [Book]
So you need to assign the result to a variable, or it is just discarded.
By the way: if you are going to use VB.NET, then you should stop using VB6 functions such as Replace and MsgBox, and use the .NET versions instead: String.Replace Method (System) | Microsoft Docs
] and MessageBox.Show Method (System.Windows) | Microsoft Docs