Hi,
I have a simple timer app that works, but I tryed to put an API Beep prodedure in it. I am not sur why but it is not beeping and not erroring. At the end of the time it goes into the if statement and displays my message, goes through the Beep; but does not Beep. I also tried puting it in other places in the code and it still does not work. I also tested my computer sound and everything seems to be working (like critical stop, Tab and sound in general). Any ideas I would really appreciate.
Thank you
Here is my code
In a module I have:
Public Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
In my form I have:
Private Sub Timer1_Timer()
Dim a As Variant
Text1.Text = Time()
'NT = counter + 1 'we set the counter to count here
If Time() > NT Then
Timer1.Interval = 500
lblDone.Visible = lblDone.Visible = False
Beep 500, 2000
End If
'Text1.Text = counter 'write the counter value out as text
Me.Refresh
End Sub
I have a simple timer app that works, but I tryed to put an API Beep prodedure in it. I am not sur why but it is not beeping and not erroring. At the end of the time it goes into the if statement and displays my message, goes through the Beep; but does not Beep. I also tried puting it in other places in the code and it still does not work. I also tested my computer sound and everything seems to be working (like critical stop, Tab and sound in general). Any ideas I would really appreciate.
Thank you
Here is my code
In a module I have:
Public Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
In my form I have:
Private Sub Timer1_Timer()
Dim a As Variant
Text1.Text = Time()
'NT = counter + 1 'we set the counter to count here
If Time() > NT Then
Timer1.Interval = 500
lblDone.Visible = lblDone.Visible = False
Beep 500, 2000
End If
'Text1.Text = counter 'write the counter value out as text
Me.Refresh
End Sub