Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Listbox Row from Code

Status
Not open for further replies.

f64

Technical User
May 23, 2003
24
US
Is it possible to use the Selected property to select a row in a listbox programmatically from code?
 
Add a listbox (name:listbox1) and add this code:

Private Sub ListBox1_Click()
Dim x As Integer
x = ListBox1.List(ListBox1.ListIndex)

Sheet1.Rows(x & ":" & x).Select
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top