'Phone Dialer in VB 'make a new project; 2 textboxen (index 0 & 1); 2 labels (index 0 & 1) '1 command button 'Insert the next code in the right place (use Insert/File) 'Press F5 ------------- code ------------------- Option Explicit Private Declare Function tapiRequestMakeCall& Lib "TAPI32.DLL" (ByVal DestAdress$, ByVal AppName$, ByVal CalledParty$, ByVal Comment$) PrivateReturnsub
ChooseNumber(strNumberas
String, strAppNameas
String, strNameas
String)dim
lngResultas
Longdim
strBufferas
String lngResult = tapiRequestMakeCall&(strNumber, strAppName, strName, "") If lngResult <> 0 Then 'error strBuffer = "Error connecting to number: "select
case
lngResultcase
-2& strBuffer = strBuffer & " 'PhoneDailer not installed?"case
-3& strBuffer = strBuffer & "Error : " & CStr(lngResult) & "."end
Select MsgBox strBufferend
If End Sub Privatesub
Command1_Click() Call ChooseNumber(Text1(0).Text, "PhoneDialer", Text1(1).Text) End Sub Privatesub
Form_Load() Text1(0).Text = "" Text1(1).Text = "" End Sub Privatesub
Form_Unload(Cancelas
Integer) End End Sub