F
Frank Krogh
When I apply the DCOUNT function in the sheet without specifying field
[=DCOUNT(myCountRange;; myCriteriaRange)] counting blanks using myCriteria =
"=" , it works just fine.
But when I try to apply exactly the same function in VBA, I receive compile
error "Argument not optional":
With frmMyForm
.lMyLabel =
Application.WorksheetFunction.DCount(Range("myCountRange"), ,
Range("myCriteriaRange"))
End With
Is the DCOUNT function really implemented in two different ways?
Is there a way to ommit this problem?
Thanks for any suggestions.
Frank Krogh
[=DCOUNT(myCountRange;; myCriteriaRange)] counting blanks using myCriteria =
"=" , it works just fine.
But when I try to apply exactly the same function in VBA, I receive compile
error "Argument not optional":
With frmMyForm
.lMyLabel =
Application.WorksheetFunction.DCount(Range("myCountRange"), ,
Range("myCriteriaRange"))
End With
Is the DCOUNT function really implemented in two different ways?
Is there a way to ommit this problem?
Thanks for any suggestions.
Frank Krogh