+ Reply to Thread
Results 1 to 6 of 6

userform textbox that searches column b

  1. #1
    Forum Contributor
    Join Date
    08-08-2006
    Posts
    203

    userform textbox that searches column b

    I have spent hours scrolling up and down this sheet looking for part numbers, so I created a userform with 2 textboxes. I want to enter a part number in the first textbox, and have the macro select the cell in column B that contains that part#. Then I will tab to the second textbox and enter a quantity. When I tab back to the first textbox, the quantity should paste into the next empty cell in the same row of the part# from textbox 1.

    Please Login or Register  to view this content.
    On first tab, cell B7 would be selected, on second tab, 500 would be placed in cell D7.

    I tried converting code from a similar post, but I ended up with extra code that crashes excel every time I try to save the file.

    Any help is appreciated,

    Thank you


    (I already know how to create a userform and set up tab orders)
    Last edited by iturnrocks; 12-04-2008 at 12:15 PM.

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    I tried converting code from a similar post, but I ended up with extra code that crashes excel every time I try to save the file.
    Fixing this might be quicker than starting from scratch - perhaps you could post it (don't forget code tags).

    HTH

  3. #3
    Forum Contributor
    Join Date
    02-19-2005
    Location
    Gurgaon,India
    MS-Off Ver
    2007,2010,2013
    Posts
    180
    Hi,

    Try something like..

    Please Login or Register  to view this content.
    HTH
    Kris

  4. #4
    Forum Contributor
    Join Date
    08-08-2006
    Posts
    203
    Quote Originally Posted by Cheeky Charlie View Post
    Fixing this might be quicker than starting from scratch - perhaps you could post it (don't forget code tags).

    HTH
    Ok, actually the first textbox is actually a combobox (sometimes I dont have to type the whole part# because of the rowsource) "cbo1"

    The original code would search a column on multiple sheets. I want it to stay on the same sheet (Adjust1!).

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    That's not very nice - try this:

    Please Login or Register  to view this content.
    Although I'm not sure what was causing a crash - this might be something to do with other coding elsewhere(?)

    CC

  6. #6
    Forum Contributor
    Join Date
    08-08-2006
    Posts
    203
    Quote Originally Posted by Cheeky Charlie View Post
    That's not very nice - try this:


    Although I'm not sure what was causing a crash - this might be something to do with other coding elsewhere(?)

    CC
    That very well could be. Its a complex (for me anyway) multiple file inventory tracking spreadsheet.

    A couple people didnt show up for work today, so I probably wont have time to test this today. Im sure it will work fine, I will let you know when I can get to it.

    Thank you,

+ 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