+ Reply to Thread
Results 1 to 4 of 4

listbox comparaison

Hybrid View

Mundis06 listbox comparaison 07-29-2015, 03:33 PM
6StringJazzer Re: listbox comparaison 07-29-2015, 04:00 PM
Mundis06 Re: listbox comparaison 07-29-2015, 07:44 PM
6StringJazzer Re: listbox comparaison 07-30-2015, 08:20 AM
  1. #1
    Registered User
    Join Date
    07-24-2015
    Location
    vanderbijlpark,South Africa
    MS-Off Ver
    2013
    Posts
    2

    listbox comparaison

    hello everyone , I have a project I 'm doing for my university which consists of having an excel document that is full of computing , I m stucked at this point where i want to have 2 list box in a sheet that shows many of the items and when you compare two items i want the sheet to show in 2 others cell sheet the numeric result value that is calculated in another sheet and the value appear only after the selection of the second item.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,770

    Re: listbox comparaison

    Here is one way to take action once an item has been selected from each list, but you haven't explained how to do the comparison or where the results go.
    Private Sub ListBox1_Click()
       Compare
    End Sub
    
    Private Sub ListBox2_Click()
       Compare
    End Sub
    
    Private Sub Compare()
    
       If Me.ListBox1.ListIndex >= 0 And _
          Me.ListBox2.ListIndex >= 0 Then
          
          ' compare two items i want the sheet to show in 2 others cell sheet
          ' the numeric result value that is calculated in another sheet
       
          ' Remove current choices
          Me.ListBox1.ListIndex = -1
          Me.ListBox2.ListIndex = -1
          
       End If
    
    End Sub
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    07-24-2015
    Location
    vanderbijlpark,South Africa
    MS-Off Ver
    2013
    Posts
    2

    Re: listbox comparaison

    Thanks 6StringJazzer , the result should appears on the same sheet where i do have the list-boxes
    .
    Last edited by Mundis06; 07-29-2015 at 07:50 PM.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,770

    Re: listbox comparaison

    If my code doesn't give you what you need then you are going to have to describe your problem in much more detail.

+ 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. [SOLVED] Find as you type in listbox control - solution for multi-column listbox - vba dictionary
    By wazimu13 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-05-2018, 03:42 AM
  2. User Form ListBox - Find Records (ListBox Populating Issue)
    By LONeillSSC in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-20-2015, 12:06 PM
  3. [SOLVED] if anything in listbox select first item, if listbox empty do nothing (listbox in userform
    By mcdermott2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2015, 12:49 PM
  4. Having problems populating a multicolumn listbox changing Listbox column with a loop.
    By Aristizabal95 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2013, 12:41 PM
  5. [SOLVED] Indexing proper range in listbox depending on selection in previous listbox
    By bloodmeat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2013, 02:31 PM
  6. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  7. Replies: 12
    Last Post: 08-28-2012, 07:09 AM

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