listbox / userform

  1. D

    Trying to subtract a 80mm from listbox value then fill it into a excel cell A10

    The error says Could not get list property. Private Sub Toolpod_Width_Change() If ListBox1.ListIndex <> -1 Then TextBox1 = ListBox1.List(ListBox1.ListIndex, 9) End If Dim ws As Worksheet Dim BodyLength As ValueChange Dim i As Long, Range As Long Set ws =...
  2. C

    How to Scroll listbox to show last entered item?

    Hello, How to auto Scroll listbox to show last entered item? Every time an item is entered I would like it to the auto show the last item entered?
  3. V

    Pasting from listbox to spreadsheet - is there a way to avoid duplicate entries?

    Hi all I am pasting data from 2 columns in a listbox to an excel spreadsheet. Is there a way I can avoid duplicate entries into the worksheet if they are already entered? I would also like to be able to tell the user which entry is a duplicate. Many thanks Private Sub CommandButton4_Click()...
  4. A

    VBA, Userform, Search Function show result for Referance number in text box, would this to also select corisponding row in list box.

    Hi all, Fairly new to VBA. I have a userform that allows you to enter Clients Information into text boxes and add this data to a table in excel. You can then search by Customer Reference no. to show results in textbox they were entered to update etc. I also have a list box that shows all...
  5. C

    UserForm with combobox and listbox depending on this

    Hi everyone! I created a userform with a combobox and a listbox. The idea is to choose from the combobox, and depending on the choice, to choose from a specific list in the listbox and use that value later on. So what i have done so far, is the following event with Combobox change: Private...
  6. J

    VBA code to allow changes to existing worksheet data

    Morning all, I hop I explain this well enough. I have a worksheet that monitors peoples favourite snacks, see image. I have a combobox1 in a userform which displays a list of all names. When the user selects a name, the preferred choice of snacks appear in the listbox on the userform...
  7. A

    Distinct values across multiple columns with occurrence count to populate ListBox

    Hi there, first post on here and pretty novice at Excel VBA. I found some great code which works really well for outputting a single column's distinct values with a count of occurrences (used for sort order) to a ListBox via another worksheet but I was wondering how I could expand the range to...
  8. M

    Listbox Targetline

    Dear All, I have a Userform with a listbox. When I double click on a record on the listbox I trigger a line and the variable Targetline returns the number of the line selected. Another userform opens and I can amend the data of this line. With the following code I write on the sheet...
  9. C

    Sorting Multiple Columns in a Listbox

    All...I found the below on this site, and it works beautifully, but... Was wondering if there is anyway to mod the code to filter two separate columns? i.e. First by Date, then by Name (Columns 15 and then 2) Any help would be greatly appreciated. This is a hard code checks, combo...
  10. K

    Filtering based on input in listbox

    Hello all, I need help with the following macro please. I am trying to use a userform to allow a selection of criteria. Based on the selection a column in the excel sheet should be filtered. So far this is my code: Dim Ary2 As Variant Dim i2 As Long, j2 As Long With Me.ListBox2...
  11. D

    Change UserForm dynamically based on input

    Hi MrExcel, I'll greatly appreciate your input re the issue below. I'm looking for an option to add elements (such as ListBoxes) to a Userform in a dynamic/interactive way: the number of ListBoxes (as well as their names, tab indices etc.) should depend on a specific input value (say, on the...
  12. B

    populate a range ("a3:h40") into listbox if cell in column "H" is interior.colorindex = 3.

    i want to populate information from range("A3:H40") to listbox only if Cell in Column("H") is colored red. the provided code list them all, even when a cell in column h is not red. Dim lbtarget As MSForms.ListBox Dim rngSource As Range Set rngSource = Sheet1.Range("A3:H19") Dim RNG As Range Set...
  13. 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...
  14. 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...
  15. 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...
  16. C

    Listbox/checkbox edit

    Hello. On my userform i have 2 checkboxes (Checkbox1, Checkbox2), where the data from those checkboxes are stored in columns 11 and 12 on worksheets("Data") depending on which checkbox is selected. I have an edit button (btnEdit) which is clicked after selecting a row from a listbox (Listbox1)...
  17. M

    Excel Listbox displays default value but does not retain in within Sub (unless you click on selection)

    0 <button class="js-vote-down-btn grid--cell s-btn s-btn__unset c-pointer" title="This question does not show any research effort; it is unclear or not useful" aria-pressed="false" aria-label="down vote" data-selected-classes="fc-theme-primary" style="margin: 2px; box-sizing: inherit; font...
  18. K

    Excel VBA Export UserForm ListBox Contents

    I am using the code below to try and export my userform listbox contents to a new workbook. However, I am getting the error as I commented in the code. I dont know where I am going wrong with this code. Need help please! <code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit...
  19. G

    populate listbox with columns values until empty column based on row value

    Hi, i have a database prepared where you can find added values from Column C onwards per Column A, Column A = project numbers Column B= project description Column C = date Column D = phase number Column E = Member Column F = Update Column G = date Column H= phase number Column I =Member...
  20. G

    filtered data showing on listbox - userform

    Hi, i am trying to figure out why the following code doesnt show only filtered data on the listbox. Can someone help me please? Dim rData As Range With Blad1 Set rData = .Range(.Cells(1, 1), .Cells(.Rows.Count, 5).End(xlUp)) If Not .AutoFilterMode Then .Cells(1, 1).AutoFilter...

Some videos you may like

This Week's Hot Topics

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
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 "".
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