View Single Post
  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

You've got lots of replies to your original thread.

mango wrote:

dear all,
can anyone give me the advice?
thanks alot

"mango" wrote:

dear all, may i know which part to disappear the dropdown arrow after input
the data in the cell?
thanks alot


Option Base 1

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Intersect(Target, Columns("E")) Is Nothing Then
Call AddDropDown(Target)
Cancel = True
End If

End Sub



Sub AddDropDown(Target As Range)
Dim ddBox As DropDown
Dim i As Integer
Dim lookuplist As Variant


lookuplist = Array(Sheet1.Cells.Range("a2:a300"))

With Target
Set ddBox = Sheet4.DropDowns.Add(.Left, .Top, .Width, .Height)
End With

With ddBox
For i = LBound(lookuplist) To UBound(lookuplist)
.AddItem lookuplist(i)

Next i
End With
End Sub



--

Dave Peterson