Hi All,
I joined only a few days back.I am a beginner for VBA.I am trying to set up a sound alert based on a threshold value in cells/cell of a column.If the value is reached in multiple cells the beep will be that many times.The issue is that it beeps only once.Below is the code I have written .Pls tell me where is the mistake.
Thanks
jaypeek
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Option Explicit
Sub testAlert()
Dim myRange As Range
Set myRange = Range(Cells(1, 1), Cells(10, 1))
Dim i As Integer
For i = 1 To myRange.Count
If myRange(i).Value >= 10 Then
Beep
End If
Next
End Sub
Bookmarks