Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Can Excel dial a phonenumber from a cell?

Is it possible to make Excel dial a phonenumber from a
cell?

Does it require a special script or macro, and if so,
does anyone know where I can find one?

Best,

Anders
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Can Excel dial a phonenumber from a cell?

John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power Programming With VBA" book. It
uses SendKeys to transfer a phone number to the Windows Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in message
...
Is it possible to make Excel dial a phonenumber from a
cell?

Does it require a special script or macro, and if so,
does anyone know where I can find one?

Best,

Anders



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Can Excel dial a phonenumber from a cell?

Hi tom,

Thanks for the script. How do I add it to my worksheet,
and how do I activate it, when working with a list of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power Programming

With VBA" book. It
uses SendKeys to transfer a phone number to the Windows

Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in message
...
Is it possible to make Excel dial a phonenumber from a
cell?

Does it require a special script or macro, and if so,
does anyone know where I can find one?

Best,

Anders



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Can Excel dial a phonenumber from a cell?

Take a look at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
to find out how to work with macros.

short lesson.
Open your workbook.
hit alt-f11 to get to the VBE (where macros live)
hit ctrl-R to see the project explorer
select your project (should look like: VBAProject (yourfilename))
Click on Insert|Module (not class module)
You'll see another window (called the code window) open up.

Paste that macro right in there.
Go back to excel
Save your workbook (just in case)
Select the cell you want to dial and
click on tools|macro|macros...
and run CelltoDialer.

==
You might find this easier for running it:
Freeze row 1 so that it's always visible.
put a button from the forms toolbar in row 1 (so it'll be visible)

When you're asked for the macro name, give it celltodialer. (or you can
rightclick on the button and select assign macro later.)

then just select your cell and click the button.



wrote:

Hi tom,

Thanks for the script. How do I add it to my worksheet,
and how do I activate it, when working with a list of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power Programming

With VBA" book. It
uses SendKeys to transfer a phone number to the Windows

Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in message
...
Is it possible to make Excel dial a phonenumber from a
cell?

Does it require a special script or macro, and if so,
does anyone know where I can find one?

Best,

Anders



.


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Can Excel dial a phonenumber from a cell?

Dave,

thanks, I'm almost there now. Everything works, except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and nothing
happens. How can I find out if the "%d" is actually the
right command to send the dialer to make it perform what
the script comment calls "click dial button"?

Best,

A
-----Original Message-----
Take a look at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
to find out how to work with macros.

short lesson.
Open your workbook.
hit alt-f11 to get to the VBE (where macros live)
hit ctrl-R to see the project explorer
select your project (should look like: VBAProject

(yourfilename))
Click on Insert|Module (not class module)
You'll see another window (called the code window) open

up.

Paste that macro right in there.
Go back to excel
Save your workbook (just in case)
Select the cell you want to dial and
click on tools|macro|macros...
and run CelltoDialer.

==
You might find this easier for running it:
Freeze row 1 so that it's always visible.
put a button from the forms toolbar in row 1 (so it'll

be visible)

When you're asked for the macro name, give it

celltodialer. (or you can
rightclick on the button and select assign macro later.)

then just select your cell and click the button.



wrote:

Hi tom,

Thanks for the script. How do I add it to my worksheet,
and how do I activate it, when working with a list of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power Programming

With VBA" book. It
uses SendKeys to transfer a phone number to the

Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in message
...
Is it possible to make Excel dial a phonenumber

from a
cell?

Does it require a special script or macro, and if

so,
does anyone know where I can find one?

Best,

Anders


.


--

Dave Peterson

.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Can Excel dial a phonenumber from a cell?

With only your workbook open
in Excel, do Alt+F11 to get to the vbe. then do Insert=Module,
Paste the code in that module

Now go to your worksheet (Alt+F11 again) and select a cell with a phone
number. Then do Tools=Macro=Macros. Select CelltoDialer and click run.

--
Regards,
Tom Ogilvy

wrote in message
...
Hi tom,

Thanks for the script. How do I add it to my worksheet,
and how do I activate it, when working with a list of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power Programming

With VBA" book. It
uses SendKeys to transfer a phone number to the Windows

Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in message
...
Is it possible to make Excel dial a phonenumber from a
cell?

Does it require a special script or macro, and if so,
does anyone know where I can find one?

Best,

Anders



.



  #7   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Can Excel dial a phonenumber from a cell?


Tom,

thanks, I'm almost there now. Everything works, except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and nothing
happens. How can I find out if the "%d" is actually the
right command to send the dialer to make it perform what
the script comment calls "click dial button"?

Best,

A
----------Original Message-----
With only your workbook open
in Excel, do Alt+F11 to get to the vbe. then do

Insert=Module,
Paste the code in that module

Now go to your worksheet (Alt+F11 again) and select a

cell with a phone
number. Then do Tools=Macro=Macros. Select

CelltoDialer and click run.

--
Regards,
Tom Ogilvy

wrote in message
...
Hi tom,

Thanks for the script. How do I add it to my worksheet,
and how do I activate it, when working with a list of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power Programming

With VBA" book. It
uses SendKeys to transfer a phone number to the

Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in message
...
Is it possible to make Excel dial a phonenumber

from a
cell?

Does it require a special script or macro, and if

so,
does anyone know where I can find one?

Best,

Anders


.



.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Can Excel dial a phonenumber from a cell?

%d is ALT-d

Open the dialer manually and try duplicating what the script is sending and
see if it works.

--
Regards,
Tom Ogilvy

wrote in message
...

Tom,

thanks, I'm almost there now. Everything works, except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and nothing
happens. How can I find out if the "%d" is actually the
right command to send the dialer to make it perform what
the script comment calls "click dial button"?

Best,

A
----------Original Message-----
With only your workbook open
in Excel, do Alt+F11 to get to the vbe. then do

Insert=Module,
Paste the code in that module

Now go to your worksheet (Alt+F11 again) and select a

cell with a phone
number. Then do Tools=Macro=Macros. Select

CelltoDialer and click run.

--
Regards,
Tom Ogilvy

wrote in message
...
Hi tom,

Thanks for the script. How do I add it to my worksheet,
and how do I activate it, when working with a list of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power Programming
With VBA" book. It
uses SendKeys to transfer a phone number to the

Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in message
...
Is it possible to make Excel dial a phonenumber

from a
cell?

Does it require a special script or macro, and if

so,
does anyone know where I can find one?

Best,

Anders


.



.



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Can Excel dial a phonenumber from a cell?

The %d and %n aren't associated with your number. The % sign is used with
Sendkeys to represent the alt-key.

So %d is alt-d (which is the accelerator key for Dial (inside Dialer)).

But I think I've read posts that some versions of windows didn't like using
dialer (but I could be wrong on that).

Orlando Magalhães Filho posted a windows API version that you may want to try:

http://groups.google.com/groups?selm...%40tkmsftngp02


(I use win98 and Windows start button|Run|Dialer pops open the dialing applet.
I could type a phone number there and hit the Dial button to verify that it
actually worked. You'll see the Dial button pop up when you put something in
the number to dial box. Notice the underscore under Dial on the button. %d.)

Anders wrote:

Dave,

thanks, I'm almost there now. Everything works, except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and nothing
happens. How can I find out if the "%d" is actually the
right command to send the dialer to make it perform what
the script comment calls "click dial button"?

Best,

A
-----Original Message-----
Take a look at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
to find out how to work with macros.

short lesson.
Open your workbook.
hit alt-f11 to get to the VBE (where macros live)
hit ctrl-R to see the project explorer
select your project (should look like: VBAProject

(yourfilename))
Click on Insert|Module (not class module)
You'll see another window (called the code window) open

up.

Paste that macro right in there.
Go back to excel
Save your workbook (just in case)
Select the cell you want to dial and
click on tools|macro|macros...
and run CelltoDialer.

==
You might find this easier for running it:
Freeze row 1 so that it's always visible.
put a button from the forms toolbar in row 1 (so it'll

be visible)

When you're asked for the macro name, give it

celltodialer. (or you can
rightclick on the button and select assign macro later.)

then just select your cell and click the button.



wrote:

Hi tom,

Thanks for the script. How do I add it to my worksheet,
and how do I activate it, when working with a list of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power Programming
With VBA" book. It
uses SendKeys to transfer a phone number to the

Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in message
...
Is it possible to make Excel dial a phonenumber

from a
cell?

Does it require a special script or macro, and if

so,
does anyone know where I can find one?

Best,

Anders


.


--

Dave Peterson

.


--

Dave Peterson

  #10   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Can Excel dial a phonenumber from a cell?

Tom,

Pressing ALT-d gives the same "error sound",But I still
have no clue about what shortcut key, or comand that will
trigger the actual dial

A

-----Original Message-----
%d is ALT-d

Open the dialer manually and try duplicating what the

script is sending and
see if it works.

--
Regards,
Tom Ogilvy

wrote in message
...

Tom,

thanks, I'm almost there now. Everything works, except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and

nothing
happens. How can I find out if the "%d" is actually the
right command to send the dialer to make it perform

what
the script comment calls "click dial button"?

Best,

A
----------Original Message-----
With only your workbook open
in Excel, do Alt+F11 to get to the vbe. then do

Insert=Module,
Paste the code in that module

Now go to your worksheet (Alt+F11 again) and select a

cell with a phone
number. Then do Tools=Macro=Macros. Select

CelltoDialer and click run.

--
Regards,
Tom Ogilvy

wrote in message
...
Hi tom,

Thanks for the script. How do I add it to my

worksheet,
and how do I activate it, when working with a list

of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power

Programming
With VBA" book. It
uses SendKeys to transfer a phone number to the

Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in

message
...
Is it possible to make Excel dial a phonenumber

from a
cell?

Does it require a special script or macro, and if

so,
does anyone know where I can find one?

Best,

Anders


.



.



.



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Can Excel dial a phonenumber from a cell?

Dave gave you a link to an API based approach that was previously posted.
Try that.

Insert a new module and paste in the code.

--
Regards,
Tom Ogilvy

wrote in message
...
Tom,

Pressing ALT-d gives the same "error sound",But I still
have no clue about what shortcut key, or comand that will
trigger the actual dial

A

-----Original Message-----
%d is ALT-d

Open the dialer manually and try duplicating what the

script is sending and
see if it works.

--
Regards,
Tom Ogilvy

wrote in message
...

Tom,

thanks, I'm almost there now. Everything works, except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and

nothing
happens. How can I find out if the "%d" is actually the
right command to send the dialer to make it perform

what
the script comment calls "click dial button"?

Best,

A
----------Original Message-----
With only your workbook open
in Excel, do Alt+F11 to get to the vbe. then do
Insert=Module,
Paste the code in that module

Now go to your worksheet (Alt+F11 again) and select a
cell with a phone
number. Then do Tools=Macro=Macros. Select
CelltoDialer and click run.

--
Regards,
Tom Ogilvy

wrote in message
...
Hi tom,

Thanks for the script. How do I add it to my

worksheet,
and how do I activate it, when working with a list

of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power

Programming
With VBA" book. It
uses SendKeys to transfer a phone number to the
Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in

message
...
Is it possible to make Excel dial a phonenumber
from a
cell?

Does it require a special script or macro, and if
so,
does anyone know where I can find one?

Best,

Anders


.



.



.



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Can Excel dial a phonenumber from a cell?

Tom,

I tried the code Dave sent me, but it turned up an syntax
error. I use Win XP & TAPI 3.0 dialer, maybe the code was
desinged specifically for 98 (maybe it doesn't make a
difference) Anyway, I'm still halfway there, any
suggestions on where to find other sripts, or how to
proceed ?

Thanks

Anders


-----Original Message-----
Dave gave you a link to an API based approach that was

previously posted.
Try that.

Insert a new module and paste in the code.

--
Regards,
Tom Ogilvy

wrote in message
...
Tom,

Pressing ALT-d gives the same "error sound",But I still
have no clue about what shortcut key, or comand that

will
trigger the actual dial

A

-----Original Message-----
%d is ALT-d

Open the dialer manually and try duplicating what the

script is sending and
see if it works.

--
Regards,
Tom Ogilvy

wrote in message
...

Tom,

thanks, I'm almost there now. Everything works,

except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and

nothing
happens. How can I find out if the "%d" is actually

the
right command to send the dialer to make it perform

what
the script comment calls "click dial button"?

Best,

A
----------Original Message-----
With only your workbook open
in Excel, do Alt+F11 to get to the vbe. then do
Insert=Module,
Paste the code in that module

Now go to your worksheet (Alt+F11 again) and

select a
cell with a phone
number. Then do Tools=Macro=Macros. Select
CelltoDialer and click run.

--
Regards,
Tom Ogilvy

wrote in message
...
Hi tom,

Thanks for the script. How do I add it to my

worksheet,
and how do I activate it, when working with a

list
of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power

Programming
With VBA" book. It
uses SendKeys to transfer a phone number to the
Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in

message
...
Is it possible to make Excel dial a

phonenumber
from a
cell?

Does it require a special script or macro,

and if
so,
does anyone know where I can find one?

Best,

Anders


.



.



.



.

  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Can Excel dial a phonenumber from a cell?

dave,

thank you for the link. unfortunately it has a syntax
error, and doesn't work. I use Win Xp and TAPI 3.0
dialer, maybe that's where the problem is?

Any suggestions on how to find other scripts or resources
that can help me?

Best,

Anders


-----Original Message-----
The %d and %n aren't associated with your number. The %

sign is used with
Sendkeys to represent the alt-key.

So %d is alt-d (which is the accelerator key for Dial

(inside Dialer)).

But I think I've read posts that some versions of

windows didn't like using
dialer (but I could be wrong on that).

Orlando Magalhães Filho posted a windows API version

that you may want to try:

http://groups.google.com/groups?selm=eOFAoRbkBHA.2448%

40tkmsftngp02


(I use win98 and Windows start button|Run|Dialer pops

open the dialing applet.
I could type a phone number there and hit the Dial

button to verify that it
actually worked. You'll see the Dial button pop up when

you put something in
the number to dial box. Notice the underscore under

Dial on the button. %d.)

Anders wrote:

Dave,

thanks, I'm almost there now. Everything works, except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and

nothing
happens. How can I find out if the "%d" is actually the
right command to send the dialer to make it perform

what
the script comment calls "click dial button"?

Best,

A
-----Original Message-----
Take a look at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
to find out how to work with macros.

short lesson.
Open your workbook.
hit alt-f11 to get to the VBE (where macros live)
hit ctrl-R to see the project explorer
select your project (should look like: VBAProject

(yourfilename))
Click on Insert|Module (not class module)
You'll see another window (called the code window)

open
up.

Paste that macro right in there.
Go back to excel
Save your workbook (just in case)
Select the cell you want to dial and
click on tools|macro|macros...
and run CelltoDialer.

==
You might find this easier for running it:
Freeze row 1 so that it's always visible.
put a button from the forms toolbar in row 1 (so it'll

be visible)

When you're asked for the macro name, give it

celltodialer. (or you can
rightclick on the button and select assign macro

later.)

then just select your cell and click the button.



wrote:

Hi tom,

Thanks for the script. How do I add it to my

worksheet,
and how do I activate it, when working with a list

of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power

Programming
With VBA" book. It
uses SendKeys to transfer a phone number to the

Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in

message
...
Is it possible to make Excel dial a phonenumber

from a
cell?

Does it require a special script or macro, and if

so,
does anyone know where I can find one?

Best,

Anders


.


--

Dave Peterson

.


--

Dave Peterson

.

  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Can Excel dial a phonenumber from a cell?

Look at google and search for "CelltoDialer" and API inside the *excel*
newsgroups.

I got two hits. This current thread and this one:
http://groups.google.com/groups?thre...40TK2MSFTNGP12

Which seemed like a very nice quick and dirty method. (Jim Cone just copied the
Dialer.* files from an older version of windows to his pc.)

If that doesn't work, search for "dial phone number". I got 191 hits with that.

http://groups.google.com/groups?q=di...roup%3A*excel*

Anders wrote:

dave,

thank you for the link. unfortunately it has a syntax
error, and doesn't work. I use Win Xp and TAPI 3.0
dialer, maybe that's where the problem is?

Any suggestions on how to find other scripts or resources
that can help me?

Best,

Anders

-----Original Message-----
The %d and %n aren't associated with your number. The %

sign is used with
Sendkeys to represent the alt-key.

So %d is alt-d (which is the accelerator key for Dial

(inside Dialer)).

But I think I've read posts that some versions of

windows didn't like using
dialer (but I could be wrong on that).

Orlando Magalhães Filho posted a windows API version

that you may want to try:

http://groups.google.com/groups?selm=eOFAoRbkBHA.2448%

40tkmsftngp02


(I use win98 and Windows start button|Run|Dialer pops

open the dialing applet.
I could type a phone number there and hit the Dial

button to verify that it
actually worked. You'll see the Dial button pop up when

you put something in
the number to dial box. Notice the underscore under

Dial on the button. %d.)

Anders wrote:

Dave,

thanks, I'm almost there now. Everything works, except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and

nothing
happens. How can I find out if the "%d" is actually the
right command to send the dialer to make it perform

what
the script comment calls "click dial button"?

Best,

A
-----Original Message-----
Take a look at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
to find out how to work with macros.

short lesson.
Open your workbook.
hit alt-f11 to get to the VBE (where macros live)
hit ctrl-R to see the project explorer
select your project (should look like: VBAProject
(yourfilename))
Click on Insert|Module (not class module)
You'll see another window (called the code window)

open
up.

Paste that macro right in there.
Go back to excel
Save your workbook (just in case)
Select the cell you want to dial and
click on tools|macro|macros...
and run CelltoDialer.

==
You might find this easier for running it:
Freeze row 1 so that it's always visible.
put a button from the forms toolbar in row 1 (so it'll
be visible)

When you're asked for the macro name, give it
celltodialer. (or you can
rightclick on the button and select assign macro

later.)

then just select your cell and click the button.



wrote:

Hi tom,

Thanks for the script. How do I add it to my

worksheet,
and how do I activate it, when working with a list

of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power

Programming
With VBA" book. It
uses SendKeys to transfer a phone number to the
Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in

message
...
Is it possible to make Excel dial a phonenumber
from a
cell?

Does it require a special script or macro, and if
so,
does anyone know where I can find one?

Best,

Anders


.


--

Dave Peterson

.


--

Dave Peterson

.


--

Dave Peterson

  #15   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Can Excel dial a phonenumber from a cell?

Dave,

I found a solution in one of your links. Thanks

A
-----Original Message-----
Look at google and search for "CelltoDialer" and API

inside the *excel*
newsgroups.

I got two hits. This current thread and this one:
http://groups.google.com/groups?thre...dR3BfzCHA.640%

40TK2MSFTNGP12

Which seemed like a very nice quick and dirty method.

(Jim Cone just copied the
Dialer.* files from an older version of windows to his

pc.)

If that doesn't work, search for "dial phone number". I

got 191 hits with that.

http://groups.google.com/groups?

q=dial+phone+number+group%3A*excel*

Anders wrote:

dave,

thank you for the link. unfortunately it has a syntax
error, and doesn't work. I use Win Xp and TAPI 3.0
dialer, maybe that's where the problem is?

Any suggestions on how to find other scripts or

resources
that can help me?

Best,

Anders

-----Original Message-----
The %d and %n aren't associated with your number.

The %
sign is used with
Sendkeys to represent the alt-key.

So %d is alt-d (which is the accelerator key for Dial

(inside Dialer)).

But I think I've read posts that some versions of

windows didn't like using
dialer (but I could be wrong on that).

Orlando Magalhães Filho posted a windows API version

that you may want to try:

http://groups.google.com/groups?selm=eOFAoRbkBHA.2448%

40tkmsftngp02


(I use win98 and Windows start button|Run|Dialer pops

open the dialing applet.
I could type a phone number there and hit the Dial

button to verify that it
actually worked. You'll see the Dial button pop up

when
you put something in
the number to dial box. Notice the underscore under

Dial on the button. %d.)

Anders wrote:

Dave,

thanks, I'm almost there now. Everything works,

except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and

nothing
happens. How can I find out if the "%d" is actually

the
right command to send the dialer to make it perform

what
the script comment calls "click dial button"?

Best,

A
-----Original Message-----
Take a look at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
to find out how to work with macros.

short lesson.
Open your workbook.
hit alt-f11 to get to the VBE (where macros live)
hit ctrl-R to see the project explorer
select your project (should look like: VBAProject
(yourfilename))
Click on Insert|Module (not class module)
You'll see another window (called the code window)

open
up.

Paste that macro right in there.
Go back to excel
Save your workbook (just in case)
Select the cell you want to dial and
click on tools|macro|macros...
and run CelltoDialer.

==
You might find this easier for running it:
Freeze row 1 so that it's always visible.
put a button from the forms toolbar in row 1 (so

it'll
be visible)

When you're asked for the macro name, give it
celltodialer. (or you can
rightclick on the button and select assign macro

later.)

then just select your cell and click the button.



wrote:

Hi tom,

Thanks for the script. How do I add it to my

worksheet,
and how do I activate it, when working with a

list
of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power

Programming
With VBA" book. It
uses SendKeys to transfer a phone number to the
Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in

message
...
Is it possible to make Excel dial a

phonenumber
from a
cell?

Does it require a special script or macro,

and if
so,
does anyone know where I can find one?

Best,

Anders


.


--

Dave Peterson

.


--

Dave Peterson

.


--

Dave Peterson

.



  #16   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Can Excel dial a phonenumber from a cell?

You may want to post back with the URL of the thread. (It may help the next
person.)

wrote:

Dave,

I found a solution in one of your links. Thanks

A
-----Original Message-----
Look at google and search for "CelltoDialer" and API

inside the *excel*
newsgroups.

I got two hits. This current thread and this one:
http://groups.google.com/groups?thre...dR3BfzCHA.640%
40TK2MSFTNGP12

Which seemed like a very nice quick and dirty method.

(Jim Cone just copied the
Dialer.* files from an older version of windows to his

pc.)

If that doesn't work, search for "dial phone number". I

got 191 hits with that.

http://groups.google.com/groups?

q=dial+phone+number+group%3A*excel*

Anders wrote:

dave,

thank you for the link. unfortunately it has a syntax
error, and doesn't work. I use Win Xp and TAPI 3.0
dialer, maybe that's where the problem is?

Any suggestions on how to find other scripts or

resources
that can help me?

Best,

Anders

-----Original Message-----
The %d and %n aren't associated with your number.

The %
sign is used with
Sendkeys to represent the alt-key.

So %d is alt-d (which is the accelerator key for Dial
(inside Dialer)).

But I think I've read posts that some versions of
windows didn't like using
dialer (but I could be wrong on that).

Orlando Magalhães Filho posted a windows API version
that you may want to try:

http://groups.google.com/groups?selm=eOFAoRbkBHA.2448%
40tkmsftngp02


(I use win98 and Windows start button|Run|Dialer pops
open the dialing applet.
I could type a phone number there and hit the Dial
button to verify that it
actually worked. You'll see the Dial button pop up

when
you put something in
the number to dial box. Notice the underscore under
Dial on the button. %d.)

Anders wrote:

Dave,

thanks, I'm almost there now. Everything works,

except
for the dialer actually dialing the number.

the dialer opens and gives the "error sound" and
nothing
happens. How can I find out if the "%d" is actually

the
right command to send the dialer to make it perform
what
the script comment calls "click dial button"?

Best,

A
-----Original Message-----
Take a look at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
to find out how to work with macros.

short lesson.
Open your workbook.
hit alt-f11 to get to the VBE (where macros live)
hit ctrl-R to see the project explorer
select your project (should look like: VBAProject
(yourfilename))
Click on Insert|Module (not class module)
You'll see another window (called the code window)
open
up.

Paste that macro right in there.
Go back to excel
Save your workbook (just in case)
Select the cell you want to dial and
click on tools|macro|macros...
and run CelltoDialer.

==
You might find this easier for running it:
Freeze row 1 so that it's always visible.
put a button from the forms toolbar in row 1 (so

it'll
be visible)

When you're asked for the macro name, give it
celltodialer. (or you can
rightclick on the button and select assign macro
later.)

then just select your cell and click the button.



wrote:

Hi tom,

Thanks for the script. How do I add it to my
worksheet,
and how do I activate it, when working with a

list
of
phonenumbers?

Cheers,

Anders

-----Original Message-----
John Walkenback previously posted this :

From: John Walkenbach )
Subject: Callable phone numbers in cells
Newsgroups: microsoft.public.excel.misc
View complete thread
Date: 2000-12-22 10:08:02 PST




Here's some code from my "Excel 2000 Power
Programming
With VBA" book. It
uses SendKeys to transfer a phone number to the
Windows
Dialer program.

Sub CellToDialer()
' 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

John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss

========<End======


--
Regards,
Tom Ogilvy


Anders wrote in
message
...
Is it possible to make Excel dial a

phonenumber
from a
cell?

Does it require a special script or macro,

and if
so,
does anyone know where I can find one?

Best,

Anders


.


--

Dave Peterson

.


--

Dave Peterson

.


--

Dave Peterson

.


--

Dave Peterson

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
DIAL A TELEPHONE NUMBER FROM EXCEL how to dial a telephone number from exce Excel Discussion (Misc queries) 1 May 5th 08 01:30 PM
replace - by blank, keep 0 in phonenumber sofie Excel Worksheet Functions 8 October 10th 06 01:00 PM
remove -, keep 0 in phonenumber sofie Excel Worksheet Functions 2 October 10th 06 11:01 AM
Is it possible to have phone numbers dial when clicked in Excel? artemis1027 Excel Worksheet Functions 1 June 28th 06 06:26 PM
Can you dial a telephone number located in an cell? Steve D. Excel Discussion (Misc queries) 0 November 20th 05 03:13 AM


All times are GMT +1. The time now is 09:58 AM.

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

About Us

"It's about Microsoft Excel"