Execute Shell Commands from Excel Cell
I have a shell command, to execute a program with additional arguments.
Shell "C:\Program Files\uvnc bvba\UltraVnc\vncviewer" & " " & Range("$G3")
The cell G3 contains an IP address I wish to start the program with.
I have no issues starting the command from a command button, but what i wish to do is to start the program with arguments from a hyperlinked cell, using:
= HYPERLINK("C:\Program Files\uvnc bvba\UltraVnc\vncviewer" & " " & Range("$G3"))
But the hyperlink can't open the program with optional arguments.
Is there someway I can open the program from hyperlink with the optional arguments?
figured it out using VBA:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("range here")) Is Nothing Then
Call Shell("program location" & " " & Target)
Else
Now I double click on a cell in the sheet containing the IP, and that will run my program with that IP.