• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Searchable ListBox with Multi Tab

saamrat

Member
Dear Experts,

I have 2 workbooks. Workbook (Data) has got 2 sheets with data (Warehouse1 and Warehouse2). Another worksheet(Stock) will have userform with a text box and Listbox with 2 Tabs. When click on cell A1 in workbook named "Stock Check", userform will open with textbox populated with cell A1 data and list box to be filled with all datas related to cell A1 in Tab1 and Tab2.

For Example, Cell A1 of workbook "Stock" is Shirt S. when we click on Shirt S, excel checks workbook named "Data" and bring the results of All Shirts in Warehouse1 to the listbox of Tab1. Similarly Tab2 with Warehouse2 data.

Is this possible ?
 

Attachments

saamrat

Member
The purpose is while invoicing by clicking on a product, we can immediately find out the stock position of various products.
Kindly help
 

Belleke

Active Member
Hi,
Like this?
Don't forget to change the correct path in the code first (3x)
No need to open Data file.
When the user form is opened, Warehouse 1 is loaded. If you change to tab 2 then Warehouse 2 is loaded, if you go back to tab 1 Warehouse 1 is loaded.
When you use the search function, the items that don't match the search criteria will be removed from the list.
 

Attachments

saamrat

Member
Wow !!!! That is awesome. ?
Is that possible to perform the search when we shift the tab, if the text box has the same text automatically?
For Eg. Text box has a text and it show the result of Warehouse1. With the same text, if click on Warehouse2, again we need to delete or add a charector. Instead, is it possible to dispaly the result of warehouse2 on click event ?,

Anyway, you are a genius!
 

saamrat

Member
OMG !!! That was Superfast. :DD
Is there anyway we can add heading in the listbox?
What changes to be made if I need just Product and Total ? I mean A and E only. Instead of entire range.
Sorry for the trouble. If not possible, I can manage with this.
I really thankful for the help. You are a life saver
 

Belleke

Active Member
1. Have a look at the properties of the listbox. (ColumnWidths)
2. For the column headers I used 2 labels. If you want headers in the listbox you have to use RowSource instead of List and I never use RowSource.
(I was told once RowSource is for people that use VBA but don't know VBA;))
 

Marc L

Excel Ninja
I never use RowSource.
(I was told once RowSource is for people that use VBA but don't know VBA
What a bad idea ! And an advanced filter, it's for lazy paeople ?!​
As Rowsource is far the easy way for common needs …​
 
Top