我正在尝试构建下面的例程。例程的最后一个参数是一个可选数组,默认情况下它应该有两个空字符串。下面的声明不起作用,它给了我这个错误:编译错误:需要常量表达
Public Sub CreateReport(rpt As Report, rptSelectFLDS As Variant, _
rptWhereConds As Dictionary, _
Optional rptTopSelect As Variant = Array("", ""))
答案 0 :(得分:3)
如何查看参数IsMissing()
?
Public Sub CreateReport(rpt As Report, rptSelectFLDS As Variant, _
rptWhereConds As Dictionary, _
Optional rptTopSelect As Variant)
If IsMissing(rptTopSelect) Then rptTopSelect = Array("", "")