View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.links
Bill Manville Bill Manville is offline
external usenet poster
 
Posts: 473
Default G'day ... Linking to .exe file help required.

I can't see any way to make that work.
I would approach it differently (assuming you can have macros in your
file) and use a VBA Shell command to run the program.

For example, if you wanted double-clicking any cell in column C to run
your program, with "-" & the content of that cell as a switch, you
could use a Worksheet_BeforeDoubleClick procedure in the module of the
sheet

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Target.Cells.Count = 1 And Target.Column = 3 Then
Shell """C:\Program Files\Program.exe"" -" & Target.Value, _
vbNormalFocus
Cancel = True
End If
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup