Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Listbox to change value in cell
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Listbox to change value in cell
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 "Jeremy" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA dynamically change width listbox | Excel Programming | |||
VBA dynamically change width listbox | Excel Programming | |||
Event change listbox | Excel Programming | |||
Listbox linked cell does not change | Excel Worksheet Functions | |||
Can I change a controlbox to a listbox on a Form | Excel Programming |