Alarm Clock
Alarm clock function to check actual time against alarm time
(See Below Code)
|
'Call this function to check whether the values for the
hours, minutes and seconds are met 'Set Alarm to 1 to start with 'Check if hours is null - if not, check whether it matches
the actual time 'Finished Checking 'Example of Calling Function 'Error Trap 'Set the values that will be checked hours = Int(Text1.Text) 'Call Function with the parameters as the values to check
for 'If a Value of 1 is return then the requirements are
met GoTo Done 'Finished errtrap: 'Trap checks to see that all the testing values (hours,
minutes and seconds) are not null or strings 'If erred=3 then all values are null, so do not check
for alarm 'Otherwise, resume at the next line Done: |
(Copy and Paste this code into your Visual Basic project)
*Want to join the C0D3 MA5T3R e-mail list?*
Get all the latest code news and articles, and even submit your own.
You can sign-up for free below (you may opt-out at any time):