一个自用的基于excel的小工具。
, ), .Cells(, ))
sysKpiRow.Interior.ColorIndex = ).value = , )
sysKpiVal.Borders.LineStyle = Excel.XlLineStyle.xlContinuous
'设置单元格,添加数据有效性,下拉框选择yes和no
With sysKpiVal.Validation
.Add(Type:=Excel.XlDVType.xlValidateList, AlertStyle:=Excel.XlDVAlertStyle.xlValidAlertStop, _
Operator:=Excel.XlFormatConditionOperator.xlBetween, Formula1:="yes,no")
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = True
.ShowError = True
End With
sysKpiVal.Value = "yes" '统一设置默认值为yes
End With
End Sub
完整的colorIndex效果见微软网站: