# Visual Basic > Visual Basic 6 and Earlier >  Is the Dcount function within the functions of Visual Basic 6? If so, how do I find i

## Mysystem

hi

Is the Dcount function within the functions of Visual Basic 6? If so, how do I find it?

----------


## OptionBase1

> hi
> 
> Is the Dcount function within the functions of Visual Basic 6?


No.




> If so, how do I find it?


It is an Excel worksheet function.

https://support.microsoft.com/en-us/...b-8d5f076eaeb1

----------


## Dan_W

> hi
> 
> Is the Dcount function within the functions of Visual Basic 6? If so, how do I find it?


As already pointed out, DCount is function used in Excel, but I think it's also still used in Access as well. In either case, you would need to access either Application via COM in order to get access to the function. 

But what would you be using it for? I ask because my understanding (having not had an occasion to use personally) is that the function is used to count the number of cells in a given range (in Excel) / records in a given field (in Access) that contain a numerical value, or a numerical value that meets a given condition. If that's the case, I imagine might be quicker to deal with the data as an array, wouldn't it?

----------

