PDA

View Full Version : EDITTING THE LIST FROM COMBOX AND CHANGE TO NEW VALUE



erixon019
08-17-2018, 12:58 AM
I am stuck-up on the change button on my codes.
I cannot figure out the correct code for me, despite of long period of searching for the right method.

I have a userform with combobox list that will call from specific range of cell. refer on below codes.
What I need is, after I select one of the cell value from the list and modified/change it and click the change button the output will be saved on the same cell. I attached the captured sample of my work.
Hope you can help me. Thank you.

Private Sub EditStation_Change()


Dim i As Integer
Dim index As Integer
index = EditStation.ListIndex


EditDN.Clear


For i = 4 To 13
Select Case index
Case Is = 0
EditDN.AddItem Sheet11.Cells(i, 6).Value
Case Is = 1
EditDN.AddItem Sheet11.Cells(i, 8).Value
Case Is = 2
EditDN.AddItem Sheet11.Cells(i, 10).Value
End Select
Next i


End Sub


Private Sub ChangeButton_Click()

'Need Help from excel guru.
'After clicking the change button the values should be save to the same called cell value.
'Example, I want to change Defect 1 to Defect 11 then output should change the previous value.

End Sub



22724