Bonjour
J'ai un petit souci avec l'utilisation de Dialer sur XP, il y a beaucoup
trop de friture.
Voici le code pour W98 aimablement rétrocédé par MichDenis, est ce qu'il n'y
en aurait pas un spécifique pour XP?
Declare Function tapiRequestMakeCall Lib "C:\Windows\system\tapi32.dll" _
(ByVal stNumber As String, ByVal stDummy1 As String, _
ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2
Public Const MB_OKCANCEL = 1
Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
'----------------------------
Sub Dialer()
ColName = 1
ColPhone = 2
'Tu peux utiliser cette procédure et appeler la fonction de cette façon si
tu désires :
'DialNumber "12454556", "Diane"
vRow = Selection.Row - 1
If vRow = 0 Then Exit Sub
DialNumber Range("A1").Offset(vRow, ColPhone - 1).Value, _
Range("A1").Offset(vRow, ColName - 1).Value
End Sub
Sub DialNumber(PhoneNumber, Optional vName As Variant)
Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String
Dim RetVal As Long
' Ask the user to pick up the phone.
Msg = "Décrochez le combiné et cliquez OK pour appeler " _
& Chr(13) & Chr(13) & PhoneNumber & " " & vName
MsgBoxType = MB_ICONINFORMATION + MB_OKCANCEL
MsgBoxTitle = "Numéro d'appel"
If MsgBox(Msg, MsgBoxType, MsgBoxTitle) = ID_CANCEL Then
Range("nom") = ""
Cells(1, 1).Select
Exit Sub
End If
' Send the telephone number to the modem.
RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "")
If RetVal < 0 Then
Msg = "Mauvais numéro d'appel " & PhoneNumber
GoTo Err_DialNumber
End If
Range("nom") = ""
[A2].Select
Exit Sub
Err_DialNumber: 'This is not an On Error routine.
Msg = Msg & Chr(13) & Chr(13) & _
"Contrôler le port d'usage pour Dial.exe"
MsgBoxType = MB_ICONSTOP
MsgBoxTitle = "Erreur d'aiguillage"
MsgBox Msg, MsgBoxType, MsgBoxTitle
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
MichDenis
Il existe aussi ceci :
'Déclaration API Declare Function DialAnyPhoneNumber Lib "tapi32.dll" Alias "tapiRequestMakeCall" ( _ ByVal strPhoneNumber As String, _ ByVal strArg1 As String, _ ByVal strArg2 As String, _ ByVal strArg3 As String) As Long
PlacePhoneCall "7777777777" End Sub '------------------------------------
"Fredo P." a écrit dans le message de news: uRGq% Bonjour J'ai un petit souci avec l'utilisation de Dialer sur XP, il y a beaucoup trop de friture. Voici le code pour W98 aimablement rétrocédé par MichDenis, est ce qu'il n'y en aurait pas un spécifique pour XP?
Declare Function tapiRequestMakeCall Lib "C:Windowssystemtapi32.dll" _ (ByVal stNumber As String, ByVal stDummy1 As String, _ ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2 Public Const MB_OKCANCEL = 1 Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
'---------------------------- Sub Dialer() ColName = 1 ColPhone = 2 'Tu peux utiliser cette procédure et appeler la fonction de cette façon si tu désires : 'DialNumber "12454556", "Diane"
vRow = Selection.Row - 1 If vRow = 0 Then Exit Sub DialNumber Range("A1").Offset(vRow, ColPhone - 1).Value, _ Range("A1").Offset(vRow, ColName - 1).Value End Sub
Sub DialNumber(PhoneNumber, Optional vName As Variant) Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String Dim RetVal As Long
' Ask the user to pick up the phone. Msg = "Décrochez le combiné et cliquez OK pour appeler " _ & Chr(13) & Chr(13) & PhoneNumber & " " & vName MsgBoxType = MB_ICONINFORMATION + MB_OKCANCEL MsgBoxTitle = "Numéro d'appel" If MsgBox(Msg, MsgBoxType, MsgBoxTitle) = ID_CANCEL Then Range("nom") = "" Cells(1, 1).Select Exit Sub End If
' Send the telephone number to the modem. RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "") If RetVal < 0 Then Msg = "Mauvais numéro d'appel " & PhoneNumber GoTo Err_DialNumber End If Range("nom") = "" [A2].Select Exit Sub
Err_DialNumber: 'This is not an On Error routine. Msg = Msg & Chr(13) & Chr(13) & _ "Contrôler le port d'usage pour Dial.exe" MsgBoxType = MB_ICONSTOP MsgBoxTitle = "Erreur d'aiguillage" MsgBox Msg, MsgBoxType, MsgBoxTitle
End Sub
Il existe aussi ceci :
'Déclaration API
Declare Function DialAnyPhoneNumber Lib "tapi32.dll" Alias "tapiRequestMakeCall" ( _
ByVal strPhoneNumber As String, _
ByVal strArg1 As String, _
ByVal strArg2 As String, _
ByVal strArg3 As String) As Long
PlacePhoneCall "7777777777"
End Sub
'------------------------------------
"Fredo P." <ponsinet.frederic363etdesbrouettes@orange.fr> a écrit dans le message de news:
uRGq%23XueIHA.484@TK2MSFTNGP06.phx.gbl...
Bonjour
J'ai un petit souci avec l'utilisation de Dialer sur XP, il y a beaucoup
trop de friture.
Voici le code pour W98 aimablement rétrocédé par MichDenis, est ce qu'il n'y
en aurait pas un spécifique pour XP?
Declare Function tapiRequestMakeCall Lib "C:Windowssystemtapi32.dll" _
(ByVal stNumber As String, ByVal stDummy1 As String, _
ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2
Public Const MB_OKCANCEL = 1
Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
'----------------------------
Sub Dialer()
ColName = 1
ColPhone = 2
'Tu peux utiliser cette procédure et appeler la fonction de cette façon si
tu désires :
'DialNumber "12454556", "Diane"
vRow = Selection.Row - 1
If vRow = 0 Then Exit Sub
DialNumber Range("A1").Offset(vRow, ColPhone - 1).Value, _
Range("A1").Offset(vRow, ColName - 1).Value
End Sub
Sub DialNumber(PhoneNumber, Optional vName As Variant)
Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String
Dim RetVal As Long
' Ask the user to pick up the phone.
Msg = "Décrochez le combiné et cliquez OK pour appeler " _
& Chr(13) & Chr(13) & PhoneNumber & " " & vName
MsgBoxType = MB_ICONINFORMATION + MB_OKCANCEL
MsgBoxTitle = "Numéro d'appel"
If MsgBox(Msg, MsgBoxType, MsgBoxTitle) = ID_CANCEL Then
Range("nom") = ""
Cells(1, 1).Select
Exit Sub
End If
' Send the telephone number to the modem.
RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "")
If RetVal < 0 Then
Msg = "Mauvais numéro d'appel " & PhoneNumber
GoTo Err_DialNumber
End If
Range("nom") = ""
[A2].Select
Exit Sub
Err_DialNumber: 'This is not an On Error routine.
Msg = Msg & Chr(13) & Chr(13) & _
"Contrôler le port d'usage pour Dial.exe"
MsgBoxType = MB_ICONSTOP
MsgBoxTitle = "Erreur d'aiguillage"
MsgBox Msg, MsgBoxType, MsgBoxTitle
'Déclaration API Declare Function DialAnyPhoneNumber Lib "tapi32.dll" Alias "tapiRequestMakeCall" ( _ ByVal strPhoneNumber As String, _ ByVal strArg1 As String, _ ByVal strArg2 As String, _ ByVal strArg3 As String) As Long
PlacePhoneCall "7777777777" End Sub '------------------------------------
"Fredo P." a écrit dans le message de news: uRGq% Bonjour J'ai un petit souci avec l'utilisation de Dialer sur XP, il y a beaucoup trop de friture. Voici le code pour W98 aimablement rétrocédé par MichDenis, est ce qu'il n'y en aurait pas un spécifique pour XP?
Declare Function tapiRequestMakeCall Lib "C:Windowssystemtapi32.dll" _ (ByVal stNumber As String, ByVal stDummy1 As String, _ ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2 Public Const MB_OKCANCEL = 1 Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
'---------------------------- Sub Dialer() ColName = 1 ColPhone = 2 'Tu peux utiliser cette procédure et appeler la fonction de cette façon si tu désires : 'DialNumber "12454556", "Diane"
vRow = Selection.Row - 1 If vRow = 0 Then Exit Sub DialNumber Range("A1").Offset(vRow, ColPhone - 1).Value, _ Range("A1").Offset(vRow, ColName - 1).Value End Sub
Sub DialNumber(PhoneNumber, Optional vName As Variant) Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String Dim RetVal As Long
' Ask the user to pick up the phone. Msg = "Décrochez le combiné et cliquez OK pour appeler " _ & Chr(13) & Chr(13) & PhoneNumber & " " & vName MsgBoxType = MB_ICONINFORMATION + MB_OKCANCEL MsgBoxTitle = "Numéro d'appel" If MsgBox(Msg, MsgBoxType, MsgBoxTitle) = ID_CANCEL Then Range("nom") = "" Cells(1, 1).Select Exit Sub End If
' Send the telephone number to the modem. RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "") If RetVal < 0 Then Msg = "Mauvais numéro d'appel " & PhoneNumber GoTo Err_DialNumber End If Range("nom") = "" [A2].Select Exit Sub
Err_DialNumber: 'This is not an On Error routine. Msg = Msg & Chr(13) & Chr(13) & _ "Contrôler le port d'usage pour Dial.exe" MsgBoxType = MB_ICONSTOP MsgBoxTitle = "Erreur d'aiguillage" MsgBox Msg, MsgBoxType, MsgBoxTitle
End Sub
MichDenis
| Ta date système retarde d'un jour.
Absolument pas, c'est le sommeil que j'ai à rattrapper !
| Ta date système retarde d'un jour.
Absolument pas, c'est le sommeil que j'ai à rattrapper !
Absolument pas, c'est le sommeil que j'ai à rattrapper !
Daniel.C
Salut. Ta date système retarde d'un jour. Cordialement. Daniel "MichDenis" a écrit dans le message de news: %
Il existe aussi ceci :
'Déclaration API Declare Function DialAnyPhoneNumber Lib "tapi32.dll" Alias "tapiRequestMakeCall" ( _ ByVal strPhoneNumber As String, _ ByVal strArg1 As String, _ ByVal strArg2 As String, _ ByVal strArg3 As String) As Long
PlacePhoneCall "7777777777" End Sub '------------------------------------
"Fredo P." a écrit dans le message de news: uRGq% Bonjour J'ai un petit souci avec l'utilisation de Dialer sur XP, il y a beaucoup trop de friture. Voici le code pour W98 aimablement rétrocédé par MichDenis, est ce qu'il n'y en aurait pas un spécifique pour XP?
Declare Function tapiRequestMakeCall Lib "C:Windowssystemtapi32.dll" _ (ByVal stNumber As String, ByVal stDummy1 As String, _ ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2 Public Const MB_OKCANCEL = 1 Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
'---------------------------- Sub Dialer() ColName = 1 ColPhone = 2 'Tu peux utiliser cette procédure et appeler la fonction de cette façon si tu désires : 'DialNumber "12454556", "Diane"
vRow = Selection.Row - 1 If vRow = 0 Then Exit Sub DialNumber Range("A1").Offset(vRow, ColPhone - 1).Value, _ Range("A1").Offset(vRow, ColName - 1).Value End Sub
Sub DialNumber(PhoneNumber, Optional vName As Variant) Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String Dim RetVal As Long
' Ask the user to pick up the phone. Msg = "Décrochez le combiné et cliquez OK pour appeler " _ & Chr(13) & Chr(13) & PhoneNumber & " " & vName MsgBoxType = MB_ICONINFORMATION + MB_OKCANCEL MsgBoxTitle = "Numéro d'appel" If MsgBox(Msg, MsgBoxType, MsgBoxTitle) = ID_CANCEL Then Range("nom") = "" Cells(1, 1).Select Exit Sub End If
' Send the telephone number to the modem. RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "") If RetVal < 0 Then Msg = "Mauvais numéro d'appel " & PhoneNumber GoTo Err_DialNumber End If Range("nom") = "" [A2].Select Exit Sub
Err_DialNumber: 'This is not an On Error routine. Msg = Msg & Chr(13) & Chr(13) & _ "Contrôler le port d'usage pour Dial.exe" MsgBoxType = MB_ICONSTOP MsgBoxTitle = "Erreur d'aiguillage" MsgBox Msg, MsgBoxType, MsgBoxTitle
End Sub
Salut.
Ta date système retarde d'un jour.
Cordialement.
Daniel
"MichDenis" <michdenis@hotmail.com> a écrit dans le message de news:
%23Uu5YUweIHA.5900@TK2MSFTNGP02.phx.gbl...
Il existe aussi ceci :
'Déclaration API
Declare Function DialAnyPhoneNumber Lib "tapi32.dll" Alias
"tapiRequestMakeCall" ( _
ByVal strPhoneNumber As String, _
ByVal strArg1 As String, _
ByVal strArg2 As String, _
ByVal strArg3 As String) As Long
PlacePhoneCall "7777777777"
End Sub
'------------------------------------
"Fredo P." <ponsinet.frederic363etdesbrouettes@orange.fr> a écrit dans le
message de news:
uRGq%23XueIHA.484@TK2MSFTNGP06.phx.gbl...
Bonjour
J'ai un petit souci avec l'utilisation de Dialer sur XP, il y a beaucoup
trop de friture.
Voici le code pour W98 aimablement rétrocédé par MichDenis, est ce qu'il
n'y
en aurait pas un spécifique pour XP?
Declare Function tapiRequestMakeCall Lib "C:Windowssystemtapi32.dll" _
(ByVal stNumber As String, ByVal stDummy1 As String, _
ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2
Public Const MB_OKCANCEL = 1
Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
'----------------------------
Sub Dialer()
ColName = 1
ColPhone = 2
'Tu peux utiliser cette procédure et appeler la fonction de cette façon si
tu désires :
'DialNumber "12454556", "Diane"
vRow = Selection.Row - 1
If vRow = 0 Then Exit Sub
DialNumber Range("A1").Offset(vRow, ColPhone - 1).Value, _
Range("A1").Offset(vRow, ColName - 1).Value
End Sub
Sub DialNumber(PhoneNumber, Optional vName As Variant)
Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String
Dim RetVal As Long
' Ask the user to pick up the phone.
Msg = "Décrochez le combiné et cliquez OK pour appeler " _
& Chr(13) & Chr(13) & PhoneNumber & " " & vName
MsgBoxType = MB_ICONINFORMATION + MB_OKCANCEL
MsgBoxTitle = "Numéro d'appel"
If MsgBox(Msg, MsgBoxType, MsgBoxTitle) = ID_CANCEL Then
Range("nom") = ""
Cells(1, 1).Select
Exit Sub
End If
' Send the telephone number to the modem.
RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "")
If RetVal < 0 Then
Msg = "Mauvais numéro d'appel " & PhoneNumber
GoTo Err_DialNumber
End If
Range("nom") = ""
[A2].Select
Exit Sub
Err_DialNumber: 'This is not an On Error routine.
Msg = Msg & Chr(13) & Chr(13) & _
"Contrôler le port d'usage pour Dial.exe"
MsgBoxType = MB_ICONSTOP
MsgBoxTitle = "Erreur d'aiguillage"
MsgBox Msg, MsgBoxType, MsgBoxTitle
Salut. Ta date système retarde d'un jour. Cordialement. Daniel "MichDenis" a écrit dans le message de news: %
Il existe aussi ceci :
'Déclaration API Declare Function DialAnyPhoneNumber Lib "tapi32.dll" Alias "tapiRequestMakeCall" ( _ ByVal strPhoneNumber As String, _ ByVal strArg1 As String, _ ByVal strArg2 As String, _ ByVal strArg3 As String) As Long
PlacePhoneCall "7777777777" End Sub '------------------------------------
"Fredo P." a écrit dans le message de news: uRGq% Bonjour J'ai un petit souci avec l'utilisation de Dialer sur XP, il y a beaucoup trop de friture. Voici le code pour W98 aimablement rétrocédé par MichDenis, est ce qu'il n'y en aurait pas un spécifique pour XP?
Declare Function tapiRequestMakeCall Lib "C:Windowssystemtapi32.dll" _ (ByVal stNumber As String, ByVal stDummy1 As String, _ ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2 Public Const MB_OKCANCEL = 1 Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
'---------------------------- Sub Dialer() ColName = 1 ColPhone = 2 'Tu peux utiliser cette procédure et appeler la fonction de cette façon si tu désires : 'DialNumber "12454556", "Diane"
vRow = Selection.Row - 1 If vRow = 0 Then Exit Sub DialNumber Range("A1").Offset(vRow, ColPhone - 1).Value, _ Range("A1").Offset(vRow, ColName - 1).Value End Sub
Sub DialNumber(PhoneNumber, Optional vName As Variant) Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String Dim RetVal As Long
' Ask the user to pick up the phone. Msg = "Décrochez le combiné et cliquez OK pour appeler " _ & Chr(13) & Chr(13) & PhoneNumber & " " & vName MsgBoxType = MB_ICONINFORMATION + MB_OKCANCEL MsgBoxTitle = "Numéro d'appel" If MsgBox(Msg, MsgBoxType, MsgBoxTitle) = ID_CANCEL Then Range("nom") = "" Cells(1, 1).Select Exit Sub End If
' Send the telephone number to the modem. RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "") If RetVal < 0 Then Msg = "Mauvais numéro d'appel " & PhoneNumber GoTo Err_DialNumber End If Range("nom") = "" [A2].Select Exit Sub
Err_DialNumber: 'This is not an On Error routine. Msg = Msg & Chr(13) & Chr(13) & _ "Contrôler le port d'usage pour Dial.exe" MsgBoxType = MB_ICONSTOP MsgBoxTitle = "Erreur d'aiguillage" MsgBox Msg, MsgBoxType, MsgBoxTitle
End Sub
Fredo P.
Merci Denis Je vais essayer cela après un petit somme d'une heure et non pas une journée.:o) "MichDenis" a écrit dans le message de news: %
Il existe aussi ceci :
'Déclaration API Declare Function DialAnyPhoneNumber Lib "tapi32.dll" Alias "tapiRequestMakeCall" ( _ ByVal strPhoneNumber As String, _ ByVal strArg1 As String, _ ByVal strArg2 As String, _ ByVal strArg3 As String) As Long
PlacePhoneCall "7777777777" End Sub '------------------------------------
"Fredo P." a écrit dans le message de news: uRGq% Bonjour J'ai un petit souci avec l'utilisation de Dialer sur XP, il y a beaucoup trop de friture. Voici le code pour W98 aimablement rétrocédé par MichDenis, est ce qu'il n'y en aurait pas un spécifique pour XP?
Declare Function tapiRequestMakeCall Lib "C:Windowssystemtapi32.dll" _ (ByVal stNumber As String, ByVal stDummy1 As String, _ ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2 Public Const MB_OKCANCEL = 1 Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
'---------------------------- Sub Dialer() ColName = 1 ColPhone = 2 'Tu peux utiliser cette procédure et appeler la fonction de cette façon si tu désires : 'DialNumber "12454556", "Diane"
vRow = Selection.Row - 1 If vRow = 0 Then Exit Sub DialNumber Range("A1").Offset(vRow, ColPhone - 1).Value, _ Range("A1").Offset(vRow, ColName - 1).Value End Sub
Sub DialNumber(PhoneNumber, Optional vName As Variant) Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String Dim RetVal As Long
' Ask the user to pick up the phone. Msg = "Décrochez le combiné et cliquez OK pour appeler " _ & Chr(13) & Chr(13) & PhoneNumber & " " & vName MsgBoxType = MB_ICONINFORMATION + MB_OKCANCEL MsgBoxTitle = "Numéro d'appel" If MsgBox(Msg, MsgBoxType, MsgBoxTitle) = ID_CANCEL Then Range("nom") = "" Cells(1, 1).Select Exit Sub End If
' Send the telephone number to the modem. RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "") If RetVal < 0 Then Msg = "Mauvais numéro d'appel " & PhoneNumber GoTo Err_DialNumber End If Range("nom") = "" [A2].Select Exit Sub
Err_DialNumber: 'This is not an On Error routine. Msg = Msg & Chr(13) & Chr(13) & _ "Contrôler le port d'usage pour Dial.exe" MsgBoxType = MB_ICONSTOP MsgBoxTitle = "Erreur d'aiguillage" MsgBox Msg, MsgBoxType, MsgBoxTitle
End Sub
Merci Denis
Je vais essayer cela après un petit somme d'une heure et non pas une
journée.:o)
"MichDenis" <michdenis@hotmail.com> a écrit dans le message de news:
%23Uu5YUweIHA.5900@TK2MSFTNGP02.phx.gbl...
Il existe aussi ceci :
'Déclaration API
Declare Function DialAnyPhoneNumber Lib "tapi32.dll" Alias
"tapiRequestMakeCall" ( _
ByVal strPhoneNumber As String, _
ByVal strArg1 As String, _
ByVal strArg2 As String, _
ByVal strArg3 As String) As Long
PlacePhoneCall "7777777777"
End Sub
'------------------------------------
"Fredo P." <ponsinet.frederic363etdesbrouettes@orange.fr> a écrit dans le
message de news:
uRGq%23XueIHA.484@TK2MSFTNGP06.phx.gbl...
Bonjour
J'ai un petit souci avec l'utilisation de Dialer sur XP, il y a beaucoup
trop de friture.
Voici le code pour W98 aimablement rétrocédé par MichDenis, est ce qu'il
n'y
en aurait pas un spécifique pour XP?
Declare Function tapiRequestMakeCall Lib "C:Windowssystemtapi32.dll" _
(ByVal stNumber As String, ByVal stDummy1 As String, _
ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2
Public Const MB_OKCANCEL = 1
Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
'----------------------------
Sub Dialer()
ColName = 1
ColPhone = 2
'Tu peux utiliser cette procédure et appeler la fonction de cette façon si
tu désires :
'DialNumber "12454556", "Diane"
vRow = Selection.Row - 1
If vRow = 0 Then Exit Sub
DialNumber Range("A1").Offset(vRow, ColPhone - 1).Value, _
Range("A1").Offset(vRow, ColName - 1).Value
End Sub
Sub DialNumber(PhoneNumber, Optional vName As Variant)
Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String
Dim RetVal As Long
' Ask the user to pick up the phone.
Msg = "Décrochez le combiné et cliquez OK pour appeler " _
& Chr(13) & Chr(13) & PhoneNumber & " " & vName
MsgBoxType = MB_ICONINFORMATION + MB_OKCANCEL
MsgBoxTitle = "Numéro d'appel"
If MsgBox(Msg, MsgBoxType, MsgBoxTitle) = ID_CANCEL Then
Range("nom") = ""
Cells(1, 1).Select
Exit Sub
End If
' Send the telephone number to the modem.
RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "")
If RetVal < 0 Then
Msg = "Mauvais numéro d'appel " & PhoneNumber
GoTo Err_DialNumber
End If
Range("nom") = ""
[A2].Select
Exit Sub
Err_DialNumber: 'This is not an On Error routine.
Msg = Msg & Chr(13) & Chr(13) & _
"Contrôler le port d'usage pour Dial.exe"
MsgBoxType = MB_ICONSTOP
MsgBoxTitle = "Erreur d'aiguillage"
MsgBox Msg, MsgBoxType, MsgBoxTitle
Merci Denis Je vais essayer cela après un petit somme d'une heure et non pas une journée.:o) "MichDenis" a écrit dans le message de news: %
Il existe aussi ceci :
'Déclaration API Declare Function DialAnyPhoneNumber Lib "tapi32.dll" Alias "tapiRequestMakeCall" ( _ ByVal strPhoneNumber As String, _ ByVal strArg1 As String, _ ByVal strArg2 As String, _ ByVal strArg3 As String) As Long
PlacePhoneCall "7777777777" End Sub '------------------------------------
"Fredo P." a écrit dans le message de news: uRGq% Bonjour J'ai un petit souci avec l'utilisation de Dialer sur XP, il y a beaucoup trop de friture. Voici le code pour W98 aimablement rétrocédé par MichDenis, est ce qu'il n'y en aurait pas un spécifique pour XP?
Declare Function tapiRequestMakeCall Lib "C:Windowssystemtapi32.dll" _ (ByVal stNumber As String, ByVal stDummy1 As String, _ ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2 Public Const MB_OKCANCEL = 1 Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
'---------------------------- Sub Dialer() ColName = 1 ColPhone = 2 'Tu peux utiliser cette procédure et appeler la fonction de cette façon si tu désires : 'DialNumber "12454556", "Diane"
vRow = Selection.Row - 1 If vRow = 0 Then Exit Sub DialNumber Range("A1").Offset(vRow, ColPhone - 1).Value, _ Range("A1").Offset(vRow, ColName - 1).Value End Sub
Sub DialNumber(PhoneNumber, Optional vName As Variant) Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String Dim RetVal As Long
' Ask the user to pick up the phone. Msg = "Décrochez le combiné et cliquez OK pour appeler " _ & Chr(13) & Chr(13) & PhoneNumber & " " & vName MsgBoxType = MB_ICONINFORMATION + MB_OKCANCEL MsgBoxTitle = "Numéro d'appel" If MsgBox(Msg, MsgBoxType, MsgBoxTitle) = ID_CANCEL Then Range("nom") = "" Cells(1, 1).Select Exit Sub End If
' Send the telephone number to the modem. RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "") If RetVal < 0 Then Msg = "Mauvais numéro d'appel " & PhoneNumber GoTo Err_DialNumber End If Range("nom") = "" [A2].Select Exit Sub
Err_DialNumber: 'This is not an On Error routine. Msg = Msg & Chr(13) & Chr(13) & _ "Contrôler le port d'usage pour Dial.exe" MsgBoxType = MB_ICONSTOP MsgBoxTitle = "Erreur d'aiguillage" MsgBox Msg, MsgBoxType, MsgBoxTitle