EXCEL vba实现 判断单元格数据 并播放wav提示音
发布网友
发布时间:2022-04-19 16:37
我来回答
共3个回答
热心网友
时间:2023-06-23 14:23
Public Declare Function sndPlaySound Lib "winmm" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
' flag uitzetten
Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1
Public Const SND_NODEFAULT = &H2
Public Const SND_MEMORY = &H4
Public Const SND_LOOP = &H8
Public Const SND_NOSTOP = &H10
Public Sub PlaySound(strSound As String)
sndPlaySound strSound, SND_ASYNC Or SND_NODEFAULT
End Sub
Sub BeepWarn()
For i = 1 To 20
If Range("A" & i).Value < 10 Or Range("B" & i).Value < 10 Then
PlaySound "C:\Documents and Settings\Administrator\×ÀÃæ\dl.wav"
Exit Sub
End If
Next i
End Sub
执行BeepWarn
热心网友
时间:2023-06-23 14:23
很好 可以给我发一份吗 QQ邮箱 461918540
热心网友
时间:2023-06-23 14:24
已经发送了。enjoy.lonely@163.com
有疑问可以追问。hi也可以。