Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15215

[RESOLVED] That annoying 'dong' sound when something ain't right....

$
0
0
I have textbox which converts lower to upper case, and then when I press the Enter key, it calls a small subroutine, which after setting some variables, starts a Timer.

When I press that Enter key (even when debugging it line by line---and when I do that, it 'dongs' at the very beginning of the timer) I get that 'dong' sound from my computer indicating something wrong (??). Here's the code snippet (removing the KeyUP call makes no difference.)

Code:

Private Sub txtGuess_KeyPress(KeyAscii As Integer)
    Select Case KeyAscii
        Case 97 To 122
            KeyAscii = KeyAscii - 32
    End Select
    If KeyAscii = 13 Then
        checkEntry (rowToCheck)  'checkEntry routine sets some variables and then enables a timer.
    End If
End Sub


Private Sub txtGuess_KeyUp(KeyCode As Integer, Shift As Integer)
    frmaudience.txtGuess.Text = txtGuess.Text
End Sub

Edit: Here's that small sub:

Code:

Private Sub checkEntry(rowNum)
    List1.ListIndex = 0
    iTime = 0
    rowToCheck = rowNum
    Timer1.Enabled = True
End Sub

....and the beginning of the timer:

Code:

Private Sub Timer1_Timer()
    Dim i As Integer, j As Integer
    Grid1.Row = rowToCheck


Viewing all articles
Browse latest Browse all 15215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>