GetNumPeriodsInFrequency

Returns the number of periods in a frequency.

Syntax

<HsvPeriods>.GetNumPeriodsInFrequency lFrequency, plNumPeriods

Argument

Description

lFrequency

Long (ByVal). The ID of the frequency. To use the application’s base frequency, pass the ID returned by GetBaseFrequency.

plNumPeriods

Long. Returns the number of periods in the frequency.

Example

The following example prints the number of periods in the application’s base frequency to Visual Basic’s Immediate window. GetBaseFrequency returns the ID of the application’s base frequency, and this ID is passed to GetNumPeriodsInFrequency.

Dim cPeriods As HsvPeriods, lFreqID As Long, lNumPeriods As Long
Set cPeriods = m_cMetadata.Periods
cPeriods.GetBaseFrequency lFreqID
cPeriods.GetNumPeriodsInFrequency lFreqID, lNumPeriods
Debug.Print CStr(lNumPeriods) & " periods in the base frequency."