+ Reply to Thread
Results 1 to 5 of 5

Code to match range with textbox and provide msgbox

  1. #1
    Forum Contributor
    Join Date
    08-10-2014
    Location
    Alberta
    MS-Off Ver
    2016
    Posts
    128

    Code to match range with textbox and provide msgbox

    Hello,

    I do not know what is wrong and why this code is not working. I tried it in two different places, and no error pops up but I don't believe the match function is working. Here is the code:
    Please Login or Register  to view this content.
    This is occurring after the textbox "Roomnum" is updated. In range J7:J17 there may be values that correspond to Roomnum, so if they match, then I want to msgbox to appear. I tried .Columns(10), but that doesn't work either (there are no other values in the column other than a title). What am I doing wrong?

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Code to match range with textbox and provide msgbox

    Try this.......

    Please Login or Register  to view this content.
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Forum Contributor
    Join Date
    08-10-2014
    Location
    Alberta
    MS-Off Ver
    2016
    Posts
    128

    Re: Code to match range with textbox and provide msgbox

    Thank you Naveed, but I did try that already and it still doesn't work.

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Code to match range with textbox and provide msgbox

    Hmm Please provide sample workbook it will make very easy to understand.

  5. #5
    Forum Contributor
    Join Date
    08-10-2014
    Location
    Alberta
    MS-Off Ver
    2016
    Posts
    128

    Re: Code to match range with textbox and provide msgbox

    Here it is. The code is located in the Name_usrfrm
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Add textbox value if new and provide date if it is overwriting value of old
    By Templemind in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-21-2014, 05:10 AM
  2. [SOLVED] Use autocomplete to provide suggestions in a textbox
    By Templemind in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2014, 02:07 AM
  3. [SOLVED] Code for a textbox to search a range of cells for a match
    By Templemind in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-10-2014, 05:48 PM
  4. VBA code: MsgBox if a range of cells do not sum to 100%
    By j.farr3ll in forum Excel General
    Replies: 4
    Last Post: 09-05-2011, 04:59 AM
  5. Code To Check blank textbox in userform with yes no msgbox
    By jwala in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2010, 05:32 AM

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