Display excel records on listbox based on selected value from the combobox

NoeMw

New Member
Joined
Aug 30, 2018
Messages
2
Hey guys, am a newbie to VBA programming... And at work am developing a userform for the excel spreadsheet.

The spreadsheet tracks the operation of the tractor, its attributes include date, opening and closing mileage, fueled on. Now on my userform i have a combobox populated with months and i have managed to change the month selected to number but the problem i want you guys to help me with is this; I dont want to pull all records to my listbox as is the case now I want the user upon selecting his prefered month only the operation records of the tractor for that month should appear on the userform listbox

Thanks in advance.
 

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
By the way here is my code thats pulling records to my listbox, how can this be tweaked as to accomplish my goal stated above, am using Excel 2010

Code:
With ListBox1
    .ColumnHeads = True
    .ColumnCount = 4
    
    .RowSource = "Sheet1!A6:D24"
    .MultiSelect = fmMultiSelectSingle
    .BoundColumn = 0
End With
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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