OVH Cloud OVH Cloud

son sur une action

14 réponses
Avatar
thiery
Bonjour vous m'avait fait cette macro et je vous en remercie
alarme sur un certain kilométrage

Private Sub Worksheet_Change(ByVal Target As Range)
c = Target.Row
If Intersect(Target, Range("F" & c)) Is Nothing Then Exit Sub
If Range("F" & c) - Range("E" & c) > 10000 _
Then MsgBox "vidange a faire"
End Sub

comment puis-je et est-ce possible de mettre un son ( bip ) tout bête à
l'ouverture de la messagebox ?
merci d'avance

--
Amicalement
thiery

10 réponses

1 2
Avatar
AV
| comment puis-je et est-ce possible de mettre un son ( bip ) tout bête à
| l'ouverture de la messagebox ?
| merci d'avance

Then MsgBox "vidange a faire" : Beep

AV
Avatar
thiery
"AV" a écrit dans le message de news:

| comment puis-je et est-ce possible de mettre un son ( bip ) tout bête à
| l'ouverture de la messagebox ?
| merci d'avance

Then MsgBox "vidange a faire" : Beep

AV

impec merci à toi

si je veux un son plus élaboré style .wav mais court qui se nommerait par
exemple thiery.wav



--
Amicalement
thiery

Avatar
jps
ça doit être possible, thiery, mais attends-toi à payer la vidange plus
cher...
jps

"thiery" a écrit dans le message de
news:43ba1cfb$0$20143$
"AV" a écrit dans le message de news:

| comment puis-je et est-ce possible de mettre un son ( bip ) tout bête à
| l'ouverture de la messagebox ?
| merci d'avance

Then MsgBox "vidange a faire" : Beep

AV

impec merci à toi

si je veux un son plus élaboré style .wav mais court qui se nommerait par
exemple thiery.wav



--
Amicalement
thiery





Avatar
LSteph
Bonjour,

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As
Long

Private Sub playit()

PlaySound "C:WINDOWSMEDIATADA.WAV", _
ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
c = Target.Row
If Intersect(Target, Range("F" & c)) Is Nothing Then Exit Sub
If Range("F" & c) - Range("E" & c) > 10000 _
Then MsgBox "vidange a faire": playit
End Sub



'lSteph
(Merci l'Api Guide)
http://www.mentalis.org/index2.shtml

"thiery" a écrit dans le message de news:
43ba1cfb$0$20143$
"AV" a écrit dans le message de news:

| comment puis-je et est-ce possible de mettre un son ( bip ) tout bête à
| l'ouverture de la messagebox ?
| merci d'avance

Then MsgBox "vidange a faire" : Beep

AV

impec merci à toi

si je veux un son plus élaboré style .wav mais court qui se nommerait par
exemple thiery.wav



--
Amicalement
thiery




Avatar
LSteph
....ici mieux ainsi, sinon le son ne vient qu'après le message:

Then playit: MsgBox "vidange a faire"


"LSteph" a écrit dans le message de news:

Bonjour,

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long)
As Long

Private Sub playit()

PlaySound "C:WINDOWSMEDIATADA.WAV", _
ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
c = Target.Row
If Intersect(Target, Range("F" & c)) Is Nothing Then Exit Sub
If Range("F" & c) - Range("E" & c) > 10000 _
Then MsgBox "vidange a faire": playit
End Sub



'lSteph
(Merci l'Api Guide)
http://www.mentalis.org/index2.shtml

"thiery" a écrit dans le message de news:
43ba1cfb$0$20143$
"AV" a écrit dans le message de news:

| comment puis-je et est-ce possible de mettre un son ( bip ) tout bête à
| l'ouverture de la messagebox ?
| merci d'avance

Then MsgBox "vidange a faire" : Beep

AV

impec merci à toi

si je veux un son plus élaboré style .wav mais court qui se nommerait par
exemple thiery.wav



--
Amicalement
thiery








Avatar
thiery
"LSteph" a écrit dans le message de news:
OEeE$
....ici mieux ainsi, sinon le son ne vient qu'après le message:

Then playit: MsgBox "vidange a faire"


"LSteph" a écrit dans le message de news:

Bonjour,

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long)
As Long

Private Sub playit()

PlaySound "C:WINDOWSMEDIATADA.WAV", _
ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
c = Target.Row
If Intersect(Target, Range("F" & c)) Is Nothing Then Exit Sub
If Range("F" & c) - Range("E" & c) > 10000 _
Then MsgBox "vidange a faire": playit
End Sub



'lSteph
(Merci l'Api Guide)
http://www.mentalis.org/index2.shtml

"thiery" a écrit dans le message de news:
43ba1cfb$0$20143$
"AV" a écrit dans le message de news:

| comment puis-je et est-ce possible de mettre un son ( bip ) tout bête
à
| l'ouverture de la messagebox ?
| merci d'avance

Then MsgBox "vidange a faire" : Beep

AV

impec merci à toi

si je veux un son plus élaboré style .wav mais court qui se nommerait
par exemple thiery.wav






SUPER merci à toi , LStpeh
jps ;);););)

quel est votre secret pour apprendre tout ça c'est à l'école d'informatique
???
génial

--
Amicalement
thiery




Avatar
thiery
LSteph wrote:
Bonjour,

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA"
_ (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As
Long) As Long

Private Sub playit()

PlaySound "C:WINDOWSMEDIATADA.WAV", _
ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
c = Target.Row
If Intersect(Target, Range("F" & c)) Is Nothing Then Exit Sub
If Range("F" & c) - Range("E" & c) > 10000 _
Then MsgBox "vidange a faire": playit
End Sub
'lSteph
(Merci l'Api Guide)
http://www.mentalis.org/index2.shtml

excuse de t'embêter mais j'ai une erreur de compilation : attendu nom de

type

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As
Long

j'ai les 3 dernières lignes écrite en rouge


--
Amicalement
thiery

Avatar
jps
AMHA, tu es victime de la coupure de ligne du post de LSteph, thiery
jps

"thiery" a écrit dans le message de
news:43ba545b$0$19696$
LSteph wrote:
Bonjour,

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA"
_ (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As
Long) As Long

Private Sub playit()

PlaySound "C:WINDOWSMEDIATADA.WAV", _
ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
c = Target.Row
If Intersect(Target, Range("F" & c)) Is Nothing Then Exit Sub
If Range("F" & c) - Range("E" & c) > 10000 _
Then MsgBox "vidange a faire": playit
End Sub
'lSteph
(Merci l'Api Guide)
http://www.mentalis.org/index2.shtml

excuse de t'embêter mais j'ai une erreur de compilation : attendu nom de

type

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long)
As

Long

j'ai les 3 dernières lignes écrite en rouge


--
Amicalement
thiery





Avatar
FxM
Bonjour,

j'ai les 3 dernières lignes écrite en rouge
Le premier truc est que ces trois dernières lignes ne doivent en faire

qu'une seule.

@+
FxM




thiery wrote:
LSteph wrote:
Bonjour,

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA"
_ (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As
Long) As Long

Private Sub playit()

PlaySound "C:WINDOWSMEDIATADA.WAV", _
ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
c = Target.Row
If Intersect(Target, Range("F" & c)) Is Nothing Then Exit Sub
If Range("F" & c) - Range("E" & c) > 10000 _
Then MsgBox "vidange a faire": playit
End Sub
'lSteph
(Merci l'Api Guide)
http://www.mentalis.org/index2.shtml

excuse de t'embêter mais j'ai une erreur de compilation : attendu nom de

type

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As
Long

j'ai les 3 dernières lignes écrite en rouge





Avatar
jps
heu....scusez, maître, encore faut-il ne pas oublier de supprimer le _
(underscore) au bout de la ligne n° 2...
à part ça, françois-xavier, all under control?
jps

"FxM" a écrit dans le message de
news:
Bonjour,

j'ai les 3 dernières lignes écrite en rouge
Le premier truc est que ces trois dernières lignes ne doivent en faire

qu'une seule.

@+
FxM




thiery wrote:
LSteph wrote:
Bonjour,

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA"
_ (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As
Long) As Long

Private Sub playit()

PlaySound "C:WINDOWSMEDIATADA.WAV", _
ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
c = Target.Row
If Intersect(Target, Range("F" & c)) Is Nothing Then Exit Sub
If Range("F" & c) - Range("E" & c) > 10000 _
Then MsgBox "vidange a faire": playit
End Sub
'lSteph
(Merci l'Api Guide)
http://www.mentalis.org/index2.shtml

excuse de t'embêter mais j'ai une erreur de compilation : attendu nom de

type

Private Const SND_ASYNC = &H1 ' jeu asynchrone
Private Const SND_FILENAME = &H20000 ' nom de fichier

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long)
As


Long

j'ai les 3 dernières lignes écrite en rouge







1 2