用VBA单击下拉菜单

我有一个小的macros在单元格B2中build立数据validation下拉菜单

Sub InternalString() Range("B2").Select With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="alpha,beta,gamma,delta" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub 

macros也select单元格。 我想添加一些东西到可以“下拉”下拉的macros中,这样一旦控件返回给用户,他们就会看到:

在这里输入图像说明

任何build议,欢迎。

从这里的build议修改,似乎SendKeys应该做的伎俩:

 Sub InternalString() Range("B2").Select With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="alpha,beta,gamma,delta" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With '"Show" the validation list as a dropdown: Application.SendKeys ("%{DOWN}") End Sub