ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Gaining the correct Listbox Column value (https://www.excelbanter.com/excel-programming/391361-gaining-correct-listbox-column-value.html)

Corey

Gaining the correct Listbox Column value
 
I have a listbox(Listbox4) that i have set to :

ColumnCount = 3

with the BoundColumn=1

When i populate the listbox, i also list the values in a more viewer friendly way by placing a (&
vbtab &) in between each Column value.

Now i need to place the value that was selected in listbox4 (the 1st value on the Left Column) as :

Range("B2").Value = ListBox4.List(ListBox4.ListCount - 1, 1) <=== This does not seem to be the
correct value to be placed into cell(B2).

How can i get the value that is the LEFT most value in Listbox4 to be placed into Cell(B4) ?

Corey....




[email protected]

Gaining the correct Listbox Column value
 
Do you want
Range("B2").Value = ListBox4.Value

this is the value in the first column (BoundColumn) of the listbox
entry selected.
regards
Paul

On Jun 15, 5:22 am, "Corey" wrote:
I have a listbox(Listbox4) that i have set to :

ColumnCount = 3

with the BoundColumn=1

When i populate the listbox, i also list the values in a more viewer friendly way by placing a (&
vbtab &) in between each Column value.

Now i need to place the value that was selected in listbox4 (the 1st value on the Left Column) as :

Range("B2").Value = ListBox4.List(ListBox4.ListCount - 1, 1) <=== This does not seem to be the
correct value to be placed into cell(B2).

How can i get the value that is the LEFT most value in Listbox4 to be placed into Cell(B4) ?

Corey....





All times are GMT +1. The time now is 12:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com