ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   List box query (https://www.excelbanter.com/excel-programming/385636-list-box-query.html)

Greg B[_9_]

List box query
 
Hi all,

I am having a problem with a Listbox.

I have a list box which retrieves the following in the columns

reg# Fullname Sex Fname Lname

I populate the list by using an autofilter using a textbox, The problem I
am having the autofilter is done by using wither the first name or last
name. which is columns 4 or 5. But I need the Reg # which is column 1.

here is the simple code I am using and how can this be changed to suit

Private Sub ListBox1_Click()
Sheet3.Range("A10").Value = ListBox1.Value

End Sub

Thanks in advance

Greg



Greg B[_9_]

List box query
 
I have worked it out,

Thanks

Greg B
"Greg B" wrote in message
...
Hi all,

I am having a problem with a Listbox.

I have a list box which retrieves the following in the columns

reg# Fullname Sex Fname Lname

I populate the list by using an autofilter using a textbox, The problem I
am having the autofilter is done by using wither the first name or last
name. which is columns 4 or 5. But I need the Reg # which is column 1.

here is the simple code I am using and how can this be changed to suit

Private Sub ListBox1_Click()
Sheet3.Range("A10").Value = ListBox1.Value

End Sub

Thanks in advance

Greg





All times are GMT +1. The time now is 08:53 AM.

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