>Has anybody used The CountA function in Excel 97.
>
>
>I've used in previous excel versions, in the following syntax:
>
> Workbooks(1).Worksheets(1).Application.CountA("A1:A8")
>
>When I run it from Excel 97. I get a "Method does not exists" error message.
>
>Any Ideas??????????
>
>Marios Patsias
I know it is not the answer you want but I haven't found another one.
After some search I have not discovered how we can call this function from VBA but we can call it from a formula directly on the worksheet. So why not include this formula on your worksheet and read the value of the cell.
If you don't want the user to see the formula, you can create a macro that will create the formula, read the value and then, delete the formula!
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com