View Single Post
  #1   Report Post  
mango
 
Posts: n/a
Default how to make dropdown arrow disappear in vba

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