Home > Blockchain >  Automatically Expand a Drop-Down List
Automatically Expand a Drop-Down List

Time:01-10

I have a cell with drop-down list in it. I manually press the down arrow (on the right of the cell) to show the content of the list. I need a way to automatically expand the list using VBA. How can I accomplish that?

CodePudding user response:

You may try below codes.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
    If Target.Cells.Count = 1 Then
        If Target.Validation.InCellDropdown = True Then
            Application.SendKeys ("%{UP}")
        End If
    End If
End Sub
  •  Tags:  
  • Related