Jane,
If you are using VB.NET (and you included support for .NET when you installed NI-DAQmx), then you should have the example you are looking for here: C:\Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Examples\DAQmx\Counter\Measure Digital Frequency\MeasDigFrequency_Low Freq1Ctr\Vb
If you are using VB6, (and you included support for VB6 when you installed NI-DAQmx), then you should have the examples here: C:\Program Files\National Instruments\NI-DAQ\Examples\Visual Basic 6.0
There isn't an example to do exactly what you want, but those examples will give you an idea how to program in VB6, then you can look at the example here for the frequency measurement part: C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Counter\Measure Digital Frequency
-Alan A.