Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date format from excel to CVS file wont. Change in CVS wont stay. | Excel Worksheet Functions | |||
OT :Start your own online business today !start making dollars | Excel Discussion (Misc queries) | |||
Start spreadsheet with WinXP start | Excel Worksheet Functions | |||
Phone Dialer | Excel Discussion (Misc queries) | |||
Cell to dialer script with win xp | Excel Programming |