Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2010
    Posts
    1

    Unanswered: Populating multiple text boxes from different workbook sheets vb

    Having trouble coding the following,

    Excel VB app that has multiple text boxes that I want to be populated with data from multiple worksheets within the app workbook. Process - when a order number is entered into search textbox2 and search is via command button. The app will match the order number in two different sheets, once the order number is found and matched in sheet 1 and sheet 2 the row vaules for that number will populate multiple textboxes back within the app.

    Example: Order number 12345 is entered in textbox2
    there are two worksheets to be referenced, sheet1 and sheet2
    when user clicks command button "Find my Work Order"
    The app will query both Sheet1 and Sheet2 for the corresponding work order number, and populate multiple textboxes (textbox3, textbox4, textbox5) with the row data for work order number 12345.

    Example of sheet data

    Sheet1
    Column A Row 1 would be work order number 12345
    Column B Row 1 would be the type (apple) which the vaule would be sent to Textbox3
    Column C Row 1 would be qty (25) which the vaule would be sent to Textbox4
    Sheet2
    Column A Row 30 would be work order number 12345
    Column B Row 30 would be the state (Ohio)
    Column C Row 30 would be status (Shipped)

    Sorry a newbe to VB/Excel any help would be great.

    Thanks,

  2. #2
    Join Date
    Jan 2009
    Location
    Kerala, India
    Posts
    183

    Populating multiple text boxes from different workbook sheets vb

    You can do this with VLOOKUP() Function (different setup for Sheet1 and Sheet2), no need of VBA. Check the Help Documents for usage of VLOOKUP() Function and details about it.
    www.MsAccessTips.com (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

Tags for this Thread

Posting Permissions

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