Home > Back-end >  DropDown a ComboBox in a sheet, NOT on a UserForm
DropDown a ComboBox in a sheet, NOT on a UserForm

Time:07-12

In an Excel sheet, NOT on a UserForm - Trying to come up with a code to be able to drop down a combo box, i.e. to get it to open. Might use it to trigger with hover over a shape. But, get a "Compile error: Invalid use of Me keyword", and without "Me." get "Run-time error '424': Object required"

Sub ActivateCB1()
ActiveSheet.ComboBox1.Activate
Me.ComboBox1.DropDown
End Sub

CodePudding user response:

Me only works in a code module attached to (eg) a worksheet or userform

Sub ActivateCB1()
    With ActiveSheet.ComboBox1
        .Activate
        .DropDown
    End With
End Sub
  • Related