|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
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
红色这句,通不过,那位达人帮助下,感谢
|
|