Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add A Second Timer : Produce Successive Beeps

Status
Not open for further replies.

dlh3334

Technical User
Dec 25, 2000
2
US
Re: My thanks to SWilliams for his support to a novice VB programmer such as myself.


Where do I place the following code(Open Explicit, etc.) after writing the your code suggested for Timer1 and Timer2?

************************************************************
Option Explicit

Dim bAlarm As Boolean ' True if alarm should sound
Dim lBeepCount As Long ' count of beeps in current alarm sounding
Const lMaxBeep As Long = 10 ' maximum beeps for alarm
************

Thanks again,
Don

 
Hi there, Option Explicit always goes under "General" - at the top of any current module (the code section of any form). without seeing the balance of what you're on about - it would appear that along with Option Explicit, those declarations will also go under "General". I hope this helps. - Micash
 
Micash is correct. The other code does not go in any procedure or routine. It just sits in the General Declarations section of the form. That way, the variables bAlarm, lBeepCount and lMaxBeep will be available to all procedures / routines in the form module.

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top