list box problem

hitch_hiker

Active Member
Joined
Feb 21, 2012
Messages
294
my list box is supposed to be 2 columns , it appears to be only one, and the LinkCell shows 0 for all choices , what do i need to do, using excel2010

please, please
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Is this embedded in a sheet? If so, what type of ListBox? Forms Control, or ActiveX Control?
 
Upvote 0
it is in a worksheet, made by vba ( listed below ), I'm sure I have not done something , but I have no idea what
Code:
Sub Macro4()
'
' Macro4 Macro
'
'

  '
    ' find blank cell
    Dim adr As String, adrR1C1 As String
   
  Range("c10").Select
     Do
         If IsEmpty(ActiveCell) = False Then
         ActiveCell.Offset(1, 0).Select
         End If
     Loop Until IsEmpty(ActiveCell) = True
 
    ' load addr with blank cell reference
   adr = ActiveCell.Address(ReferenceStyle:=xlA1)
 
    ' create listbox and make LinkedCell = adr
   ActiveSheet.ListBoxes.Add(220.5, 240, 284.75, 51.75).Select
    
    With Selection
      .ListFillRange = "'product list'!$u$140:$v$500"
      '
        .LinkedCell = adr
        .MultiSelect = xlSimple
        .Display3DShading = False
    '
    
    
 End With
 
 Range("a15").Select
    
End Sub

I am trying to display 2 columns ( one the product id the other the description ) on selection I want to pass the product id to the LinkedCell
 
Upvote 0
I don't think you can display more than one column in a Forms listbox.
 
Upvote 0
thanks for that, could I use a combobox , I could concatenate the two cells, and use a landing cell and manipulate from there , but it poses a few thinking problems
 
Upvote 0
Why not use an ActiveX listbox?

Mind you that still wouldn't give you the 2 values selected in the control source.

You could create code that concatenates the 2 values and put the result in a cell.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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