+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] How to update selected item in a listbox using a combo box?

Hybrid View

reddwarf [SOLVED] How to update... 06-28-2017, 03:15 AM
LeoTaxi Re: How to update selected... 06-28-2017, 05:44 AM
reddwarf Re: How to update selected... 06-28-2017, 03:40 PM
  1. #1
    Forum Contributor
    Join Date
    07-06-2009
    Location
    London, England
    MS-Off Ver
    Microsoft 365, Excel, Version 2409
    Posts
    210

    [SOLVED] How to update selected item in a listbox using a combo box?

    Hi,
    I would like to update Col 6 from the selected row in my list box with a yes/no answer rom a combo box
    Example attached.
    My list box is populated by an array which I got elsewhere of this forum

    
    Private Sub UserForm_Initialize()
    Dim lr As Long
    Dim arr As Variant
    Dim arr2 As Variant
    Dim mystring As String
    Dim x As Integer
    
    Sheets("Data").Select
    lr = Sheets("Data").Range("A" & Rows.Count).End(xlUp).Row
    arr = Range("A2", "H" & lr)
    UserForm1.ListBox1.List = arr
    End Sub
    Attached Files Attached Files
    Last edited by reddwarf; 06-28-2017 at 03:40 PM.

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: How to update selected item in a listbox using a combo box?

    Private Sub cboSolved_Change()
    Sheets("Data").Cells(ListBox1.ListIndex + 2, 5) = cboSolved
    ListBox1.List(ListBox1.ListIndex, 4) = cboSolved
    End Sub

    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    07-06-2009
    Location
    London, England
    MS-Off Ver
    Microsoft 365, Excel, Version 2409
    Posts
    210

    Re: How to update selected item in a listbox using a combo box?

    Works brillant. Thanks very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Get the name of a listbox where an item is selected
    By Jerbinator in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-22-2016, 03:16 PM
  2. Selected item in first listbox.
    By waka in forum Access Tables & Databases
    Replies: 1
    Last Post: 02-09-2015, 11:45 PM
  3. [SOLVED] update listbox item only updates first item
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2014, 04:16 PM
  4. Populate Combo box 2 based on Selected item in Combo box 1
    By Vasu_XL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2014, 07:45 AM
  5. Remove selected item from listbox
    By ChrisMattock in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-28-2014, 08:36 AM
  6. [SOLVED] Update (strikethrough) Listbox item selected within sheet
    By ShaunRoos in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2014, 02:45 PM
  7. Making The Last Combo Box Item Always The Selected Item
    By abduljaleel.mca in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2013, 10:31 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