Excel VBA ActiveX Series #7 ListBox - Custom Fill A Listbox Any Way You Want

preview_player
Показать описание

This video demonstrates how you can fill a listbox with anything you want - and up to 10 custom columns. If you use a range/ named range, you can have many more columns, but at least this way you can fill with custom criteria. Check this out!

Fantastic Developer Tools:
Рекомендации по теме
Комментарии
Автор

Just found your tutorial on YouTube after surfing quite a bit. I like the way you teach! Even when I got a little lost as you broke down the nested loop portion, I was still able to get it because your visuals were fantastic. I plan to watch more of your tutorials. Thank you!

raeone
Автор

Imagine my excitement when I found this after searching through hundreds of forums.
THANK YOU !!!

NegruSorin
Автор

Thanks Dan. I'm getting a lot out of your videos. Much appreciated!

michaelhudson
Автор

Thanks Michael for you input. I'm really glad to hear that sir. Dan

ExcelVbaIsFun
Автор

An mol,

whatevers inputting in the listbox, make sure you use the round function or format function. example:

blah=Round(piVariable, 2)

instead of blah = piVariable (or whatever)


using the round function should clean it up to whatever level of decimals you desire, standard is 2 decimal places.

ExcelVbaIsFun
Автор

Merry Christmas everyone. I hope God blesses you richly this upcoming year. Remember, you ARE a success!! Believe it, be it! Blessings my friends!! Dan

ExcelVbaIsFun
Автор

This was really cool and useful, thanks bro

GnoClip
Автор

Hey Dan, thank you so much for posting this video.Related to this video, how about adding criteria instead of column 2 only.Is this possible, let say i would like to add column 3 as additional criteria.thanks and appreciate your kind inputs.

aircooledcondenser
Автор

I also found this tutorial by searching for ListBox info.  It is really, really great.  Very easy to follow, and I like the way you run through your process as you think about the project. 
I found that the "lrcode" throws an "Application-defined or object-defined error".  I have no idea how to fix it.  I've also downloaded Type Pilot and the code they now give for "lrcode" is entirely different.  Using Excel 2010.

waltelliott
Автор

Thanks for your easy to understand Awesome!!! My next question is how could you make this work based on two criteria? So where you have East as one of the criteria, what if you wanted to filter between two dates for everything with east and then populate it to the listbox? Any chance you could help with suggestions? Have been racking my brain to try and make it happen but with no Thanks in advance

mattratsss
Автор

Is there a way to align certain columns in a list box either right or left, each column separately? So for example all the dates and dollar amounts will be aligned right and the text will be aligned left.

yoninovak
Автор

Hi Dan, thanks for sharing a great video! Just wanted to ask if you provide the excel file with the vba code ?

parekhsunjay
Автор

Hello, I was wondering if it's possible to edit the data in the list box, or do you have to scroll down to the actual data set. I have a huge data set, so I wish to make it easier to edit by searching for one criteria like in the video.

Thanks

ChrisKing
Автор

How to give a appearance of listbox like list of buttons? thank for your time!

alejandroatencio
Автор

Thank you for this great tutorial, it helped me a lot but there is only 1 problem... and i am sure it is very very easy but i couldnt handle it. On 0:34 you hide the headers but i want to show the headers. The problem is i couldnt define my Row=1 as a header so i see nothing at the Listbox's header section. I keep searching but couldn't find.

bugraotken
Автор

This tutorial really helped me out, but I have a question.  In the beginning, you almost didn't add a button to trigger the event.  I have a workbook where I have a Category, a Subcategory, and a Part number.  The first userform lets me select a category, then another userform loads so I can select from just the subcategories within the selected category.  It unloads Userform1, shows userform 2, and then i have to click the button to get that userform2 to populate with the subcats associated with the cats selected.  How can I make it so that I don't have to click a button - the listbox in userform2 updates automatically when the userform2 opens?  Thanks.

dalegearhart
Автор

Hi Dan! This helped a lot, thanks! I can't work it out though. I have my list box in a userform in a sheet and in different sheet is the database with the information to populate the listbox -same workbook. What do I need to change in the "cells" part to refer to this different sheet?


here is what I did:

Private Sub boxFamilia_Change()
criterio = BoxFamilia.Text

Dim x As Long

On Error Resume Next
If Sheets(Arquivos).Cells(Rows.Count, 1).End(xlUp).Row = 1 Then
ultimaLin = 2
Else
ultimaLin = Sheets(Arquivos).Cells(Rows.Count, 1).End(x1up).Row
End If

  For x = 2 To ultimaLin
  
  If Sheets(Arquivos).Cells(x, 2) = criterio Then
  
  'I only need the first column to show in the listbox
   Me.ListIndividuos.AddItem Sheets(Arquivos).Cells(x, 1)
  
  End If
    
  Next x
  
 End Sub

Thank you very much!

julibgodinho
Автор

Hello I have one quick question.
I have result being displayed in listbox i.e 3.141592654 and I want it to display something like 3.14. How do i do that ?
Thanks

anmolintoronto
Автор

Hello, I was wondering if it's possible to edit the data in the list box, or do you have to scroll down to the actual data set. I have a huge data set, so I wish to make it easier to edit by searching for one criteria like in the video.

Thanks

ChrisKing