Replace all your code with the following and try, i hope it works as you want.
vb Code:
  1. Option Explicit
  2.  
  3. Private Const SND_APPLICATION = &H80         '  look for application specific association
  4. Private Const SND_ALIAS = &H10000     '  name is a WIN.INI [sounds] entry
  5. Private Const SND_ALIAS_ID = &H110000    '  name is a WIN.INI [sounds] entry identifier
  6. Private Const SND_ASYNC = &H1         '  play asynchronously
  7. Private Const SND_FILENAME = &H20000     '  name is a file name
  8. Private Const SND_LOOP = &H8         '  loop the sound until next sndPlaySound
  9. Private Const SND_MEMORY = &H4         '  lpszSoundName points to a memory file
  10. Private Const SND_NODEFAULT = &H2         '  silence not default, if sound not found
  11. Private Const SND_NOSTOP = &H10        '  don't stop any currently playing sound
  12. Private Const SND_NOWAIT = &H2000      '  don't wait if the driver is busy
  13. Private Const SND_PURGE = &H40               '  purge non-static events for task
  14. Private Const SND_RESOURCE = &H40004     '  name is a resource name or atom
  15. Private Const SND_SYNC = &H0         '  play synchronously (default)
  16. Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
  17.  
  18. Private Sub Command1_Click()
  19.     Dim i As Long
  20.     Dim j As Long
  21.    
  22.     List4.Clear
  23.     For i = 0 To List3.ListCount - 1
  24.         For j = 0 To List4.ListCount - 1
  25.             If List3.List(i) = List4.List(j) Then
  26.                 List4.ItemData(j) = List4.ItemData(j) + 1
  27.                 Exit For
  28.             End If
  29.         Next j
  30.         If j = List4.ListCount Then
  31.             List4.AddItem List3.List(i)
  32.             List4.ItemData(List4.NewIndex) = 1
  33.         End If
  34.     Next i
  35.    
  36.     For j = 0 To List4.ListCount - 1
  37.         List4.List(j) = List4.List(j) & " - " & List4.ItemData(j)
  38.     Next j
  39. End Sub
  40.  
  41.  
  42. Private Sub Command2_Click()
  43. '    On Error Resume Next
  44.     Dim j As Long
  45.     Dim f() As String
  46.     If Check1.Value = 1 Then
  47.         For j = 0 To List4.ListCount - 1
  48.             f = Split(List4.List(j), " - ")
  49.             If f(1) / 10 = Int(f(1) / 10) Then ' play sound only when count is exactly 10, 20, 30, etc..., remove this check if you want to play when count is just greater than 10
  50.                 If Int(f(1) / 10) >= 1 And Int(f(1) / 10) <= 25 Then
  51.                     If f(0) = "(IP Engelli)" Then
  52.                         PlayWarnSound "ipengelli.wav"
  53.                     ElseIf f(0) = "(Alanlar Boþ)" Then
  54.                         PlayWarnSound "alanlarbos.wav"
  55.                     ElseIf f(0) = "(Þifre Basit)" Then
  56.                         PlayWarnSound "sifrebasit.wav"
  57.                     ElseIf f(0) = "(K.Adý Ayný)" Then
  58.                         PlayWarnSound "kullaniciadiayni.wav"
  59.                     End If
  60.                 End If
  61.             End If
  62.         Next
  63.     End If
  64.     List4.Clear
  65. End Sub
  66.  
  67. Private Sub PlayWarnSound(strFile As String)
  68.     PlaySound App.Path & "\" & strFile, ByVal 0&, SND_FILENAME Or SND_ASYNC
  69.     MsgBox "You exceeded the limit. Alarm plays."
  70. End Sub
  71.  
  72. Private Sub Command3_Click()
  73.     List3.AddItem "(IP Engelli)"
  74.     List3.AddItem "(IP Engelli)"
  75. End Sub
  76.  
  77. Private Sub Command4_Click()
  78.     List3.AddItem "(Alanlar Boþ)"
  79.     List3.AddItem "(Alanlar Boþ)"
  80. End Sub
  81.  
  82. Private Sub Command5_Click()
  83.     List3.AddItem "(Þifre Basit)"
  84.     List3.AddItem "(Þifre Basit)"
  85. End Sub
  86.  
  87. Private Sub Command6_Click()
  88.     List3.AddItem "(K.Adý Ayný)"
  89.     List3.AddItem "(K.Adý Ayný)"
  90. End Sub