|
vb宏
Range("B2:B10").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= xlBetween, Formula1:="张三,李四,王五"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.IMEMode = xlIMEModeNoControl
.ShowInput = True
.ShowError = True
End With
vb.net
With ExcelApp.Selection.Validation
.Delete
.Add Type:=ExcelApp.xlValidateList, AlertStyle:=ExcelApp.xlValidAlertStop, Operator:=ExcelApp.xlBetween, Formula1:="张三,李四,王五")
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.IMEMode = ExcelApp.xlIMEModeNoControl
.ShowInput = True
.ShowError = True
End With
红色这句,通不过,那位达人帮助下,感谢
|
|