I am trying to build the routine below. The last argument of the routine is an optional array, by default it should have two empty strings. The declaration below doesn't work, it gives me this error: Compile error: Constant expression required
Public Sub CreateReport(rpt As Report, rptSelectFLDS As Variant, _
rptWhereConds As Dictionary, _
Optional rptTopSelect As Variant = Array("", ""))
How about just checking to see if the argument IsMissing()?
Public Sub CreateReport(rpt As Report, rptSelectFLDS As Variant, _
rptWhereConds As Dictionary, _
Optional rptTopSelect As Variant)
If IsMissing(rptTopSelect) Then rptTopSelect = Array("", "")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With