listbox

  1. 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...
  2. 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")...
  3. 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...
  4. 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...
  5. 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 =...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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)...
  11. 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
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. VBE313

    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...
  17. gravanoc

    ListBox Change Selection (VBA)

    This seems like it is frustratingly simple, but I've had no luck with getting my ListBox to deselect or even change its current selection. My ListBox is populated with all the tabs in the workbook (there are 36 tabs with very long names), so when they click the tab name in the ListBox it...
  18. J

    Copy Selected MultiColumn Listbox Values to Another Listbox

    Hi guys, I am trying to copy selected items from a multi-column listbox to another (At this stage I want columns 1,2 and 5 copied across to columns 0, 1, 2 in the second listbox on a separate userform). I have written the following code, however it is only showing the last selected value in the...
  19. Y

    Drag and drop file

    i don't know possibly if anyone will understand me and how possible it is 1) i need a code that, whenever i drag a file from explorer into a listbox, it should add the file name and path to the listbox items. 2) having a listbox populated with files and their paths, is there a code that when...
  20. Z

    ListBox error

    Hi, On my userform I have a ListBox that is auto generated based on a list on my main worksheet. From the list on the userform the user can select which people they want the file to be sent to. The code I wrote loops through each of the users in the ListBox to see which ones are selected. If...

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