1. G

    Populate Access ListBox with Distinct/Unique Values

    I'm a CS student in my 4th year, my professor wont grade my assignment because i didn't populate a ListBox correctly (I got a 10/200 but i have an option to turn in 1 revision). The ListBox named "lstCateName" displays a property type (castle, villa, manor) from a table named "tblProperty" on a...
  2. D

    VBA ListBox variable/object type

    Hi all, I have a UserForm with a ComboBox and a ListBox on it; their respective names are "ComboBox_Field" and "ListBox_Value". Their list values are currently strings, but might be dates or integers as well. Now, I have a function to count the number of selected items in a ListBox...
  3. B

    Userform ListBox - Display a Tick if Condition is Met

    Is it possible in a ListBox that has its row source from a spreadsheet that it can display a symbol like a Tick if the value in the row source was the value "YES" for example ? I have a column that will only have the value YES or No and would like to display a Tick or Cross rather than the...
  4. G

    Creating a group for items in a listbox

    Is there a way to create groups of line items from the listbox? I have a userform that allows me to show and hide certain columns. There are 2 listboxes in the userform; one to 'Show' the list item and the other to 'Hide' the list item. By double clicking the items in the listboxes, a user can...
  5. G

    Remove blank items from a listbox

    I have a listbox that loads the list items from a range of cells. Some of the cell values in the range are blank, therefore when the code is executed, the listbox loads the blank cells in as well. I would like to see if there is a way to have the code remove the blank values from the list. I've...
  6. sharky12345

    Listbox dates not formatted correctly

    I have a strange behaviour occurring whilst trying to load a Listbox on a Userform. I have the following code which populates the Listbox with data dependant on the value of column E: Private Sub UserForm_Initialize()Dim Rng As Range, Dn As Range, c As Long, Ray() Set Rng = Range(Range("A2")...
  7. G

    Rearrange column headers using listbox

    I'm looking for a way to move line items in a listbox to rearrange the order of my table headers. So maybe a click and drag approach where I click and hold one line item in my listbox and drag it to a different position in the listbox so that it changes the table header location. Or maybe...
  8. A

    userform listbox - using find to populate

    hi all, i'm using the following code to find a particular name in my workbook, and then return particular cell value from the sheets on which it is found. Public Sub search() Dim ws As Worksheet Dim rngFound As Range Dim strFirst As String Dim strSearch As String Dim...
  9. S

    Populate Outlook Userform Listbox From Excel Data Table

    Hi Guys, I know how to populate a Userform Listbox from within excel, but I want to create a listbox in Outlook to be populated from data in the first column of an Excel table. At the moment I have this from within Excel: Me.ListBox1.List =...
  10. A

    Multi column listbox and textbox search

    Hi Guys, I've got a user form with a listbox and textbox. What I'm trying to achieve is when I type things in the textbox it searches the listbox and removes anything that doesnt relate.("*" Wildcard "*") The column I want it to search in is column C and it currently has 6 columns. What is the...
  11. T

    Populate a listbox from a range skipping duplicates

    My spreadsheet contains a range of cells with dates. They are in random order and there are duplicates I want to use this range in a listbox on a userform. But I want to prevent it showing duplicates and preferably would have the dates ordered from old to new. I am trying to do this by copying...
  12. W

    How to export filtered listbox contents into an excel file?

    I am using an userform with a listbox and I want to export the filtered listbox contents into an excel file. myarray = Sheet61.ListObjects("Data").DataBodyRange.Value With ListBox1 .List = myarray .ColumnCount = 25 .ColumnHeads = False End With This code loads the DataBodyRange.Value into...
  13. G

    Add checkboxes to Listbox

    I have many checkboxes that I would like to move to a listbox to make things look neater in my spreadsheet. I have never used the listbox but I would like it to include all of my checkboxes with the option to choose multiple checkboxes. I know I must change the properties of the listbox...
  14. D

    Find current week number from 2 different listboxes

    Hi, I had a listbox (ListBox1) with all 52 weeks of the year in and Fluff very kindly supplied me with this code that worked perfectly for me: Me.ListBox1.Selected(Application.WeekNum(Date) - 1) = True But because the listbox was so long I have decided to use 2 listboxes (ListBox1, ListBox2)...
  15. D

    Listbox to highlight current week when opened.

    Hi, I have a listbox (listbox1) with the numbers 1-52 in it. I would like a code that highlights the current week when the userform is loaded. Any help would be much appreciated. Thanks Dan
  16. L

    Userform Listbox Row Source

    Hi all I have a table displaying in my userform listbox I have set the rowsource to the table name (dossier) but it does not show the table headers, is there a way I can do this? This is the line of code: UserForm1.lstdisplay.RowSource = "Dossier" Also if I get this to display will it remain...
  17. M

    Dynamic ListBox for an invoice

    Hello Everybody, I woud lile your help on some issues i'm facing when i try to populate a combobox from a specific range based on a certain condition. Below is a listbox i created that provides the summary of all the invoices registered (see image below as an example): When i select an i...
  18. R

    Order of Union Range merging

    I have a listbox on a userform that has a couple dozen entries, each entry corresponds to a column of data in a larger worksheet. Roughly the steps are: #1 Find mrXValues from a set of two DTPickers #2 Union mrXValues to mrTotal which will be used to graph #3 Find the first series #4...
  19. P

    Lock listbox after CLICK event

    I have a listbox with code that runs after user makes a selection (clicks item). It's a Form Control (vs. ActiveX type). Right now, while the code runs (takes about 5 seconds to complete), user can immediately click another item on list and listbox selection changes (though click event doesn't...
  20. V

    How to Offset Column in this Multi Select Listbox?

    I got this code from OnlinePCLearning. How do I offset every other column? Private Sub cmdAdd_Click() Dim addme As Range, cNum As Integer Dim x As Integer, y As Integer, Ck As Integer 'set variables Set addme = Sheet1.Cells(Rows.Count, 4).End(xlUp).Offset(1, 0) cNum = 7...

Some videos you may like

This Week's Hot Topics