VBAvalidation列表默认值

当在VBA中创build一个validation列表时,是否有一种方法可以显示默认值? 到目前为止我有:

.Cells(j, 7).Validation.Add Type:=xlValidateList, Formula1:="=" & "Listname" 

当然。 只需在添加validation规则后明确设置单元格的值:)

 Dim defaultValue as String 'string right? defaultValue = ... 'get the value you want from your [ListName] .Cells(j, 7).Validation.Add Type:=xlValidateList, Formula1:="=" & "Listname" .Cells(j, 7).Value = defaultValue