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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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
can I create the active x listbox using vba ? , this is only active when the "help" button is pressed.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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