Hi all,
I have a userform which opens when you select a cell, in this userform a label (called CurrentName) will read what the contents of the active cell are. There is also a texbox in the userform (called NewName).
The purpose of this is essentially like a replace all function but within a userform. The code reads the value of the current cell and then the user can chose something new in the textbox and the code will find all references to the currentname and replace them with the newname.
At the moment it is working however it appears to have a slight issue in that it is replacing any instance of the word found rather than whole cell value. So for example, if I have 'Hello' in the active cell and 'Hello Two' in another cell, when I select to change it to 'Goodbye' it will change both 'Hello' to 'Goodbye' but also will change 'Hello Two' to 'Goodbye Two', whereas I would rather the second example stayed as 'Hello Two' because I only want to replace instances where 'Hello' is the only value in the cell, not where it appears with other values as well.
I hope that makes sense. It's probably something really obvious I have overlooked but would appreciate the help. Here is my code so far:
Bookmarks