Consulting

Results 1 to 2 of 2

Thread: Word not found message box

  1. #1
    VBAX Regular
    Joined
    Aug 2014
    Posts
    21
    Location

    Word not found message box

    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).
    UserForm 2.jpg
    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.

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,060
    Location
    Can I ask why you wish to replicate an existing function?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •