Results 1 to 11 of 11

Listbox showing data searched in a sheet using the given combobox value

Threaded View

  1. #11
    Registered User
    Join Date
    11-09-2017
    Location
    Hamburg
    MS-Off Ver
    Mac 2011
    Posts
    7

    Re: Listbox showing data searched in a sheet using the given combobox value

    Hi again,

    another issue is stopping me.
    In the Userform8 I'm populating the listbox1 as following:

    Me.ListBox1.ColumnWidths = "100;100;100;100;100;100;100;50"
    Dim WS As Worksheet
    Dim c As Range
    Dim LastRow As Long
    Dim A As Long

    Label5.Visible = True


    Me.TextBox2.Value = ""
    Me.TextBox1.Value = ""





    Me.ListBox1.Clear
    'Me.ComboBox1.Clear

    Set WS = Worksheets("DU")

    With WS
    LastRow = .Cells(Rows.Count, "A").End(xlUp).Row

    With .Range("a2:a" & LastRow - 1)
    Set c = .Find("*", LookIn:=xlValues)
    If Not c Is Nothing Then
    firstAddress = c.Address
    Do
    'If c.Offset(0, Range("F2").Column - 1) = "" Then
    With Me.ListBox1
    'Name
    ' .AddItem c.Offset(0, 0)
    ' .AddItem C.Offset(0, Range("A1").Column - 1)

    'Column B - Invoice Number
    .AddItem c.Offset(0, 1)
    'Invoice Dae

    .Column(0, .ListCount - 1) = c.Offset(0, 0) 'NOME FORNITORE

    .Column(1, .ListCount - 1) = c.Offset(0, 1) 'num fattura
    .Column(2, .ListCount - 1) = c.Offset(0, 2) 'DATA FATTURA
    'Value
    .Column(3, .ListCount - 1) = "Û " & c.Offset(0, 3) 'IMPORTO FATTURA
    'When due
    .Column(4, .ListCount - 1) = c.Offset(0, 4)
    'When Paid
    ' If C.Offset(0, 5) = "" Then
    ' .Column(4, .ListCount - 1) = "No Date"
    'Else
    .Column(5, .ListCount - 1) = c.Offset(0, 5)
    'End If
    'Payment method
    .Column(6, .ListCount - 1) = c.Offset(0, 20)
    'Status
    .Column(7, .ListCount - 1) = c.Offset(0, 21)
    'row number of the record
    .Column(8, .ListCount - 1) = c.Row
    End With
    ' End If
    Set c = .FindNext(c)
    Loop While Not c Is Nothing And c.Address <> firstAddress
    End If
    End With

    End With

    End Sub


    Now I would like that when I double click on a row of the listbox1, the selected record (8 columns) is populating the Listbox1 in the userform9
    No idea how to do it.
    thank you in advance.
    Giacomo
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Show only searched item in listbox only (userform)
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-21-2017, 07:08 AM
  2. [SOLVED] Any Faster Way to Copy/Paste this range? (I have searched and searched and searched)
    By liquidmettle in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-12-2015, 02:33 PM
  3. make searched at combobox
    By bskaa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-30-2013, 09:13 AM
  4. Summary sheet that pulls specific data when searched for
    By Jake7208 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-24-2013, 01:59 AM
  5. Stopping VBA Search from showing error if searched item does not exist
    By viralshade in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2013, 09:37 PM
  6. Replies: 2
    Last Post: 12-07-2012, 02:10 AM
  7. Replies: 6
    Last Post: 02-27-2010, 11:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1