+ Reply to Thread
Results 1 to 3 of 3

Message box based on user entry in cell

  1. #1
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Message box based on user entry in cell

    Greetings, Gurus.

    I'm trying to create a macro to automatically run when a user types anything in cell B39. The macro would search the value of the entry, and would perform a lookup against a table named "recnwpp". If the value is found in the table, I want a message box to pop-up saying "This Part # should end with R". The user should have to click Okay. If the entry is not found, then the macro should simply exit. I don't want the macro to run if the cell is changed from a part number back to an empty cell.

    I don't know how to perform a vlookup in a macro, and I don't know how to assign a macro to a cell change event. Any help would be greatly appreciated.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    You don't say what col the return value is.

    Use a event macro for the trigger

    e.g

    and see link for the find part. Will need the offset to return the value

    http://www.ozgrid.com/VBA/find-method.htm

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706
    Thanks, Noob. I'll check it out.

    Have a good one!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1