+ Reply to Thread
Results 1 to 5 of 5

textbox_change : no find do nothing

  1. #1
    Registered User
    Join Date
    07-25-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    22

    textbox_change : no find do nothing

    Hello,

    I have two columns with numbers and two textboxes. When I put a number (=unique) in textbox1. I want my userform to search for that number in column A and give me the value in the same row of column B and put in textbox2. I have the following code (which is working). The problem I am experiencing is when I type something in textbox1 that is not in column A I get an error. Is there a way to say something like: if not exists do nothing?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: textbox_change : no find do nothing

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: textbox_change : no find do nothing

    Hi, Norie,

    shouldn´t it only be
    Please Login or Register  to view this content.
    due to the offset used before?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: textbox_change : no find do nothing

    Holger

    Oops, the Offset(0,1) should be removed from the Find.
    Please Login or Register  to view this content.
    Which I should have remembered.

  5. #5
    Registered User
    Join Date
    07-25-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: textbox_change : no find do nothing

    Thank you !

+ 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. Replies: 1
    Last Post: 12-17-2012, 08:00 PM
  2. Replies: 4
    Last Post: 09-18-2012, 10:54 AM
  3. Find Macro With Userform - To find a data across multiple tabs in excel
    By Testify in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-15-2012, 04:49 PM
  4. [SOLVED] Despite data existing in Excel 2002 spreadsheet Find doesn't find
    By AnnieB in forum Excel General
    Replies: 1
    Last Post: 06-15-2006, 09:15 PM
  5. Replies: 1
    Last Post: 01-31-2006, 06:25 PM

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