473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

List Box colums - and value retrieval

553 512MB
From a List Box, how to get value in 2nd column ?

If we do Listbox0.Value , then we get the selected value in the first column only. How can i get value in 2nd column ?


Thanks
Jul 19 '07 #1
3 18453
JKing
1,206 Expert 1GB
You can use the following:
Expand|Select|Wrap|Line Numbers
  1. Me.List.Column(1, Me.List.ItemsSelected(0))
  2.  
The first parameter is the position of the column you want. This starts at 0 so 0 would be 1 and 1 would be 2 etc.
The second parameter is the row and Me.List.ItemsSelected(0) points to the first row of the selected items. If you're using a multi-select just add a for loop to cycle through the selectedItems.
Jul 19 '07 #2
questionit
553 512MB
I have only these Column properties available for my listbox - I am using VBA

ColumnHidden
ColumnOrder
ColumnWidth

do you know how to do with VBA?

You can use the following:
Expand|Select|Wrap|Line Numbers
  1. Me.List.Column(1, Me.List.ItemsSelected(0))
  2.  
The first parameter is the position of the column you want. This starts at 0 so 0 would be 1 and 1 would be 2 etc.
The second parameter is the row and Me.List.ItemsSelected(0) points to the first row of the selected items. If you're using a multi-select just add a for loop to cycle through the selectedItems.
Jul 19 '07 #3
JKing
1,206 Expert 1GB
I am also using VBA. The Column property is supported for both listboxes and combo boxes.
Jul 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Lyle H. Gray | last post by:
We load a table from a text file using Data Transformation Services. The source file is already sorted by primary key order. After the DTS load, the default retrieval order on the target table...
0
by: Bernard Dhooghe | last post by:
In http://www-1.ibm.com/partnerworld/pwhome.nsf/weblook/eac_a_webcast_052504.html the writer says (page 50, Multidimensional Clustering Advisor): " The MDC Advisor feature of the DB2 Design...
4
by: smshahriar | last post by:
Hi, I want to scan from the following string all the hex numbers and populate an array of integers: 0x27 0x00 0x30 0x00 0x33 0x00 0x36 0x00
1
by: Pavils Jurjans | last post by:
Hello, I am building custom hashtable class, and thinking about value retrieval issues. The thing is, that sometimes the hashtable value may contain value null. If someone is reading this value...
1
by: basulasz | last post by:
May be it is a bit easy question but i don't know the way to display data in bounded colums. I get data from DB with a datareader, and I want to display them on bounded colums. I dont want to...
10
by: Jeff Williams | last post by:
How can I get a list of the Groups both Local and Domain groups a User belongs to.
0
by: zafar | last post by:
I don't know what property should be used for hiding colums in Data Grid, whereas in Data Grid View we have DataGridView1.Colums(index).Visible = False , But how can I hide Colums in Data Grid.....
12
by: grace | last post by:
i am wondering why my database retrieval becomes too slow...we set up a new server (ubuntu, breezy badger) machine where we transferred all our files from the old server.. Our new server uses Asus...
2
by: msrahul | last post by:
HI ALL Plz Help Me. I have a datagrid with a few colums. One column is conaining 1's or 0's. Its like a flag column. It either has 0 or 1. Now what i need is that if any row has 1 in this column...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.