Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Phone Dialer in XP

I'm having trouble using VBA to dial a number from an Excel Cell in XP

Prior to XP I user John Lacher's code: (updated to new folder location in XP
-C:\Program Files\Windows NT)

Sub AutoDialer()
Dim strDial As String
Dim intReturn As Integer
strDial = ActiveCell.EntireRow.Columns("B").Value
intReturn = Shell("C:\Program Files\Windows NT\Dialer.exe", 1) '\ verify
correct path
Application.SendKeys ("{F5}" & strDial & "~")

End Sub

Any Ideas on what's missing?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Phone Dialer in XP

strDial = ActiveCell.EntireRow.Columns("B").Value
try
strDial = ActiveCell
or
strDial = ActiveCell.value

OR
this maybe from a number in a cell

Sub CellToDialer() 'John Walkenbach
' Transfers active cell contents to Dialer
' And then dials the phone

' Get the phone number
CellContents = ActiveCell.Value
If CellContents = "" Then
MsgBox "Select a cell that contains a phone number."
Exit Sub
End If

' Activate (or start) Dialer
Appname = "Dialer"
AppFile = "Dialer.exe"
On Error Resume Next
AppActivate (Appname)
If Err < 0 Then
Err = 0
TaskID = Shell(AppFile, 1)
If Err < 0 Then MsgBox "Can't start " & AppFile
End If

' Transfer cell contents to Dialer
Application.SendKeys "%n" & CellContents, True

' Click Dial button
Application.SendKeys "%d"
' Application.SendKeys "{TAB}~", True
End Sub


--
Don Guillett
SalesAid Software

"Vacation's Over" wrote in message
...
I'm having trouble using VBA to dial a number from an Excel Cell in XP

Prior to XP I user John Lacher's code: (updated to new folder location in

XP
-C:\Program Files\Windows NT)

Sub AutoDialer()
Dim strDial As String
Dim intReturn As Integer
strDial = ActiveCell.EntireRow.Columns("B").Value
intReturn = Shell("C:\Program Files\Windows NT\Dialer.exe", 1) '\ verify
correct path
Application.SendKeys ("{F5}" & strDial & "~")

End Sub

Any Ideas on what's missing?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up an phone dialer with Excel? ~Tom Excel Programming 0 March 11th 05 11:39 PM
How can I cross reference phone numbers with existing phone numbe. John Excel Discussion (Misc queries) 1 February 11th 05 04:39 PM
Phone Dialer Pat Excel Discussion (Misc queries) 5 January 7th 05 06:28 PM
Dialer wont start Pat Excel Programming 1 November 1st 04 02:39 PM
Cell to dialer script with win xp anders Excel Programming 3 October 22nd 03 04:34 AM


All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"