Search and select through listbox.

shinumon

New Member
Joined
Sep 24, 2015
Messages
16
I have a sheet1 with columns A to H with different data like Bill number, date, account head, customer name, amount etc. Column B contains date.
My userform1 contains a textbox1, command button1 and a listbox1. When I enter a date in the textbox1and click the command button1,all the rows for that date from column A to H should be populated on the listbox1.
Again if I select a row in the listbox1, the actual row in the sheet should get selected..
Is it possible. I am new to Vba and couldn't work it out.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I have a sheet1 with columns A to H with different data like Bill number, date, account head, customer name, amount etc. Column B contains date.
My userform1 contains a textbox1, command button1 and a listbox1. When I enter a date in the textbox1and click the command button1,all the rows for that date from column A to H should be populated on the listbox1.
Again if I select a row in the listbox1, the actual row in the sheet should get selected..
Is it possible. I am new to Vba and couldn't work it out.
That can be done. You said: the actual row in the sheet should get selected..
Now what?
I suspect you want to do more then just selecting the row.
 
Upvote 0
I'm going to leave this to someone else to help you.
I was hoping you would say what you plan to do after selecting the row.
But since right now all you want is to select the row.
To select a row that sheet must be the active sheet or we must use a Goto Function
And if you just click on a row in the listbox some how the script has to know what row that particular row came from.
And your talking about a Multicolumn listbox with 8 columns.
So:
This is beyond my knowledgebase.
I will continue to monitor this thread to see what I can learn.
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,454
Members
449,083
Latest member
Ava19

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