¦p¦ó¦bA1³oÀx¦s®æ¼Æ¦r¶W¹L100©Î¤p©ó100®Éµo¥XÁnÅT¡A°õ¦æ¥H¤Uªºµ{¦¡³£·|¥X²{§ä¤£¨ìÀɮתº¿ù»~¡A¦ý§ÚÀɮ׸ô®|À³¸Ó¨S©ñ¿ù°Ú!
¥i¥H½Ð°Ý¤@¤U°ÝÃD¬O¥X¦bþ¸Ì¶Ü?
Sub Alert()
Dim spath As String, cmd As String
spath = "C:\Users\Administrator\Desktop\¶W¹L100.wav"
cmd = "sndrec32 /play /close " & Chr(34) & spath & Chr(34)
Shell cmd, 6
End Sub
Sub Alert2()
Dim spath As String, cmd As String
spath = "C:\Users\Administrator\Desktop\¤p©ó100.wav"
cmd = "sndrec32 /play /close " & Chr(34) & spath & Chr(34)
Shell cmd, 6
End Sub
Sub ¨C¹jY¤z¬í°õ¦æ()
IF Time < TimeValue("08:45:00") And Time > TimeValue("13:45:00") Then Exit Sub
With Activesheet
For Each x In .Range("A1",.Range("A1").end(xlDown))
If x > 100 Then Application.Run "Alert"
If x < 100 Then Application.Run "Alert2"
Next
End With
t = DateAdd("s",¨C¹jY¤z¬í,Time)
Application.OnTime t, "¨C¹jY¤z¬í°õ¦æ"
End Sub |