PDA

View Full Version : Solved: Select Cooresponding Cell Fron Listbox



Ethan
09-05-2011, 12:06 PM
Hello all,

the following code selects the selected corresponding cell from the listbox.
If ListBox1.ListIndex > -1 Then Cells(ListBox1.ListIndex + 1, 13).Select

However the cells are on another sheet than the listbox.
What do I need to do?

JWest
09-05-2011, 04:21 PM
Try the following:


If ListBox1.ListIndex > -1 Then

Application.Goto ActiveWorkbook.Sheets("Sheet2").Cells(ListBox1.ListIndex + 1, 13)


Replace "Sheet2" with the location of the cells you wish to select

Ethan
09-08-2011, 01:10 PM
Thanks JWest, it worked!