Moderatori: Anthony47, Flash30005
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Sub Emetti_Beep()
If Range("D6") Then
Beep 1500, 500 ' Frequenza in KHz= 1500, Durata in millisecondi=500
' Per cambiare frequenza del suono e durata varia i due valori presenti dopo "Beep"
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A6")) Is Nothing Then
If Range("D6") Then
Emetti_Beep
End If
End If
End Sub
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Function PlaySound(Suono)
If Application.CanPlaySounds Then
Call sndPlaySound32(Suono, 0)
End If
End Function
=SE(D6; playsound("C:\Documents and Settings\Il-Path-Completo\CamcorderStop.wav");"")
Public Declare PtrSafe Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
#If VBA7 Then
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As LongPtr) As LongPtr
#Else
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
#End If
Function PlaySound(Suono)
If Application.CanPlaySounds Then
Call sndPlaySound32(Suono, 0)
End If
End Function
=SE(D6; playsound("C:\Documents and Settings\Il-Path-Completo\CamcorderStop.wav");"")
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A3")) Is Nothing Then
If Target.Address(0, 0) = "A1" And Range("D1") Or _
Target.Address(0, 0) = "A2" And Range("D2") Or _
Target.Address(0, 0) = "A3" And Range("D3") Then
Emetti_Beep
End If
End If
End Sub
Sub Emetti_Beep()
If Range("D1") Or Range("D2") Or Range("D3") Then
Beep 1500, 500 ' Frequenza in KHz= 1500, Durata in millisecondi=500
' Per cambiare frequenza del suono e durata varia i due valori presenti dopo "Beep"
End If
End Sub
Ho inserito, sempre nel modulo 1, di seguito a quanto inserito prima, (dove va inserito in realtà?), il codice successivo avendo cura di inserire il dato del file in mio possesso, così:
- Codice: Seleziona tutto
=SE(D6; playsound("C:\Users\Aldo\Music\Musica_wav\0385.wav");"")
=SE(A1>B1; playsound("C:\Users\Aldo\Music\Musica_wav\0385.wav");"")
Torna a Applicazioni Office Windows
Problema con copia dati senza formattazione Autore: systemcrack |
Forum: Applicazioni Office Windows Risposte: 9 |
Visitano il forum: Nessuno e 22 ospiti