Listbox to change value in cell

  • Thread starter Thread starter Jeremy
  • Start date Start date
J

Jeremy

I have a listbox with 3 columns going (1, 2, 3). Feeding this listbox is a
sheet with three columns (A,B,C).

What I am trying to do is when the user clicks on a button, the value that
is currently selected in listbox column 3 is looked up on the sheet in Column
C and the value next to it, Column B is changed to "yes"...which would then
change the listbox column 2 to "yes"

I know I need to do an offset, but having a hard time getting started, I
appreciate anyone's help.
 
try this

Private Sub CommandButton1_Click()

If ListBox1.ListIndex < 0 Then Exit Sub

With Worksheets("Sheet2").Range("A6")
.Offset(ListBox1.ListIndex, 1) = "yes"
End With

End Sub
 
Back
Top