Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pat Pat is offline
external usenet poster
 
Posts: 122
Default Dialer wont start

The following code works fine under WindowsME but will not run in WindowsXP.
The message I am getting when the code is run is "Cannot start Dialer.exe"
The message has an OK option only and whae clicked will not stop the code
from running. The only course of action is to close down Excel via the Task
Manager.



Private Sub CommandButton1_Click()
CellContents = Cells(ActiveCell.Row, "AB").Value
If CellContents = "" Then
MsgBox "Select a cell that contains a phone number."
Exit Sub
End If
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

Application.SendKeys "%n" & CellContents, True

Application.SendKeys "%d"
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Dialer wont start

Pat - hello again,

Two things...

1. You are missing part of the code - "exit sub" - is one part, full file path is another.
2. XP is different

Take a look at this...
http://groups.google.com/groups?thre...FTNGP11&rnu m

Regards,
Jim Cone
San Francisco, CA


"Pat" wrote in message ...
The following code works fine under WindowsME but will not run in WindowsXP.
The message I am getting when the code is run is "Cannot start Dialer.exe"
The message has an OK option only and whae clicked will not stop the code
from running. The only course of action is to close down Excel via the Task
Manager.


Private Sub CommandButton1_Click()
CellContents = Cells(ActiveCell.Row, "AB").Value
If CellContents = "" Then
MsgBox "Select a cell that contains a phone number."
Exit Sub
End If
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
Application.SendKeys "%n" & CellContents, True
Application.SendKeys "%d"
End Sub

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
Date format from excel to CVS file wont. Change in CVS wont stay. Fish''s Mermaid Excel Worksheet Functions 1 October 14th 06 12:28 AM
OT :Start your own online business today !start making dollars [email protected] Excel Discussion (Misc queries) 0 May 6th 06 09:29 PM
Start spreadsheet with WinXP start Gordon Gradwell Excel Worksheet Functions 1 July 13th 05 11:35 AM
Phone Dialer Pat Excel Discussion (Misc queries) 5 January 7th 05 06:28 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 02:18 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"