+ Reply to Thread
Results 1 to 7 of 7

Populating a userform from a search button and editing the workbook

  1. #1
    Registered User
    Join Date
    11-13-2013
    Location
    Idaho
    MS-Off Ver
    Excel 2007
    Posts
    4

    Populating a userform from a search button and editing the workbook

    Hi all
    I am new to Excel programming so please forgive my ignorance. I have a spreadsheet with about 20 columns that are updated daily. I have been tasked with creating a userform that can be used to call a record from the dispatch sheet by either WO number, Product Number. The record needs to display 8 cells from the line chosen.
    I got a lot of the code and ideas from different forums including this one. The issue is I can’t get it to work correctly. First issue is when I hit the search button, the Documents folder. Second it returns the row number instead of the contents of the WO cell. Next the cells that have the contents of a VLookup don’t display along with the cells past the 10th column. I have attached the file in question.
    Any help or direction would be great.
    FF1 SSN dispatch New v1 - Copy.xlsm

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Populating a userform from a search button and editing the workbook

    Hi jonesdwj

    I don't know where your going with this or why you're creating a Results Worksheet. Seems to me AutoFilter would do the job.

    However, to correct this, in your Do Statements, make these changes
    Please Login or Register  to view this content.
    In the UserForm lbResList ListBox change the Number of Columns to 10...adjust the Column Lists as desired.

    Let me know of issues...
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    11-13-2013
    Location
    Idaho
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Populating a userform from a search button and editing the workbook

    JasLake
    I apologize for the wording in my post (it was late) but when I wrote “the Documents folder.” I meant to say the Documents folder from my computer opens.
    As I said I got a lot of the code from the net, so the Results Worksheet is not something I want and was going to remove but when I did the rest of the form would not work correctly.
    I made the changes you suggested and I got the error “Run-Time error '380': Could not set ListIndex property. Invalid property value.” I think I put it where you said but I am sure that I did something wrong. I will attach the file with the changes. It is the user form that all the information is supposed to be displayed in and edited from.
    The intent of the user form is so a person can search 100’s of records by entering a WO or a Product Number and then enter or append the comments.
    I do thank you for the help
    FF1 SSN dispatch New v1 - Copy.xlsm

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Populating a userform from a search button and editing the workbook

    Hi jonesdwj

    You have 3 Do Statements in your UserForm Code...you changed only one.

    You also changed this line of Code from
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and this is what caused the Error you are getting...don't know why you changed this particular line of Code. Don't have a clue why this line of Code exists but, CHANGE IT BACK.

    I DID suggest this
    In the UserForm lbResList ListBox change the Number of Columns to 10...adjust the Column Lists as desired.
    In the UserForm, Right Click on lbResList, select Properties, scroll down to ColumnCount, change from 1 to 10. You will need to set the Column Width of these 10 Columns to suit your needs.

    Need help let me know...I'd recommend an entirely NEW direction.

  5. #5
    Registered User
    Join Date
    11-13-2013
    Location
    Idaho
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Populating a userform from a search button and editing the workbook

    Jaslake
    That which you have suggest has worked
    I am having issues with the update function now.

    Need help let me know...I'd recommend an entirely NEW direction.
    What direction would recommend?
    Last edited by jonesdwj; 11-15-2013 at 07:37 AM.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Populating a userform from a search button and editing the workbook

    Hi jonesdwg

    Here's a Link to a Database Workbook that I've used quite often. It's easily adaptable to most needs.

    http://excel-it.com/excel_databaseform.html

  7. #7
    Registered User
    Join Date
    11-13-2013
    Location
    Idaho
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Populating a userform from a search button and editing the workbook

    Jaslake

    You have been a great help. And the questions that I had, have been solved. The excel.com site can’t help me.

+ 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. Userform>Editing a column temporarily in a sheet for textbox search
    By JustLukas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2013, 02:18 AM
  2. [SOLVED] Problem populating a textbox from another closed workbook in a userform
    By tilous in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2013, 11:13 PM
  3. [SOLVED] Search button on an USERFORM
    By alopecito in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2012, 09:34 AM
  4. Search Button On Userform
    By markrennolds in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2010, 04:06 PM
  5. Enable Mouse's right button Menue & WS editing while Userform running
    By wali in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2009, 08:20 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