Hi All,

Linkback
http://www.mrexcel.com/forum/excel-q...used-here.html

I'm confused here, I have range of cells, which need to be filled with data. the Data/Text could come from :

1. user manually typing it
2. user select and double click from listview in userform

these 2 conditions,should each execute different tasks. like this
the 2nd task will be like this (similar to 1st task) but refer to different name range
user select and double click from listview in userform
the value then copied to BoxSearchListAcc, then from it connect (do vlookup) to SuggListAcc, thus the value from
SuggListAcc will be copied back to within Range P8:P57. So the result will be the value of SuggListAcc

How to write the code? and where?

currently, the 2nd task run through the 1st and here's the current code

1 st task - user manually typing it, within range P8:P57,
the value then copied to BoxSearchAcc, then from it connect (do vlookup) to BoxSuggestionAcc, thus the value from
BoxSuggestionAcc will be copied back to within Range P8:P57. So the result will be the value of BoxSuggestionAcc
Private Sub Worksheet_Change(ByVal Target As Range)   If Not Intersect(Target, Range("P8:P57")) Is Nothing Then
        Application.EnableEvents = False
        Sheets("Master").Range("BoxSearchAcc").Value = Target.Value
        Target.Value = Sheets("Master").Range("BoxSuggestionAcc")
        Application.EnableEvents = True
    End If
End Sub
2 nd task - user select and double click from listview in userform


Private Sub ListView1_DblClick()

On Error Resume Next

Dim i As Integer

For i = 1 To ListView1.ListItems.Count
    'untuk selected item ke-i maka
    If ListView1.ListItems(i).Selected Then
    'yang diselect = yg dimaksud dicopy
        Selection = ListView1.SelectedItem
        ActiveCell.Offset(1).Select
        Exit Sub
    End If
Next i

On Error GoTo 0

End Sub

thanks a lot for the help,
regards,