Replace all Occurrences of One String With Another

Category:
String Manipulation
Type:
Snippets
Difficulty:
Intermediate
Author:
Matt Bram

Version Compatibility:

More information:
This function acts like the Replace function in VB6, though it does not include all the optional parameters of its VB6 counterpart.

Thanks to James Pragit for improving this function and correcting a minor bug (08/03/2000).

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: