Listbox Index value in multicolumn

rharri1972

Board Regular
Joined
Nov 12, 2021
Messages
132
Office Version
  1. 2019
Platform
  1. Windows
Hello!
I have a userform (CustomerActivityCenter) with Listbox1 that is populated with several customers with multiple columns.

On the same userform I have a command button (Insert Order)

The listbox is set to single select.

I will find my customer in the list and click on it or highlight it and then I will click the INSERT ORDER button.

Upon clicking the button:

How can i say with vba, use the value in Listbox1.index (0) (first column of data) as it's reference value and then find the same value in the active worksheet? The activesheet is titled "Customers" and the reference column is "A". I have the code inserted in the command button to activate worksheet "Customers".

There will also be a userform (CustomerOrderForm) that will be opened with the click of the same (Insert Order) button.

When the userform(CustomerOrderForm) initializes... I would need data from the row that was previously found on the active worksheet to populate 6 different textboxes on the Customer Order userform.

Column A value to textbox14
Column B value to textbox15
Column C value to textbox16
Column D value to textbox17
Column E value to textbox18
Column F value to textbox19

Any help will be greatly appreciated!!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: finding listbox index 0 value in Column A of active worksheet - OzGrid Free Excel/VBA Help Forum
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,846
Messages
6,121,905
Members
449,054
Latest member
luca142

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top