PDA

View Full Version : Word not found message box



LukeAM
10-17-2014, 03:48 AM
Hi,

I've created a VBA userform and code that allows a person to find a word and replace it. However, I want to create some code so that a message box appears if the word they are looking for is not found. I'm fairly new to VBA and so far haven't been able to create some code that will do this. A picture of my userform is shown below (sorry if it's a bit small).
12406
For example, if I type in the "Word(s) want to change" box "Football" and in the "Replacement word(s)" box "Rugby", click "OK" and the word "Football" is not found, I want a message box to appear saying "Word not found". Hope that is clear enough to understand.

Aussiebear
10-17-2014, 07:45 PM
Can I ask why you wish to replicate an existing function?