Signature (Visual Basic / VBA)
Public Function BeepForSeconds( _
Optional ByVal vSeconds As Double = 0 _
) As Boolean
Code Example
? BeepForSeconds(5)
True
Parameters
| Parameter | Description |
|---|---|
| vSeconds | The number of seconds for which this function will Beep. vSeconds defaults to 0 (zero) if it is missing. |
Return Value
Function returns True if vSeconds is >= 0 (greater than or equal to zero) and it returns False otherwise.
Notes & Version History
| Note | The function will Beep at least once even if vSeconds is 0 (zero). |
| Warning | This function does not work well with Windows environments where the Beep sound has been replaced by a multimedia sound, and the sound hardware is non-blocking (the sound hardware is decent)--it usually ends up sounding like a Max Headroom sample. |
| v1.3 Change | Changed the name of the argument, changed its datatype from Variant to Double, and specified a default value for it. |