If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Populating multiple text boxes from different workbook sheets vb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-18-10, 20:14
kants83 kants83 is offline
Registered User
 
Join Date: Sep 2010
Posts: 1
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,
Reply With Quote
  #2 (permalink)  
Old 10-25-10, 07:20
apr pillai apr pillai is offline
Registered User
 
Join Date: Jan 2009
Location: Kerala, India
Posts: 107
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.
__________________
http://www.msaccesstips.com (Learn MS-Access Tips & Tricks)
Learn Advanced MS-Access Programming with sample VBA Code.
Reply With Quote
Reply

Tags
excel, excel programming, populate, text box, visual basic

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On