Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Launch external application
I use excel to track information on a couple hundred switches and was
wondering if the following is possible. Each row contains information on each switch including its IP address, is it possible to launch an external application and pass the IP address stored in the cell. The program I use is called putty and and I can launch it from the command line with "putty 10.3.14.19". Thanks Sal |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Launch external application
On Feb 26, 5:42 pm, "SP" wrote:
I use excel to track information on a couple hundred switches and was wondering if the following is possible. Each row contains information on each switch including its IP address, is it possible to launch an external application and pass the IP address stored in the cell. The program I use is called putty and and I can launch it from the command line with "putty 10.3.14.19". Thanks Sal I have entered the following code and assigned it to an object: Sub ActivateCalculator() AppFile = "putty.exe" On Error Resume Next AppActivate "Putty" If Err < 0 Then CalcTaskID = Shell(AppFile, vbNormalFocus) If Err = 0 Then MsgBox "Unable to start the Calculator" End If End Sub This works, when I click on the object the application starts. I would like to pass the IP address stored in the cell to the application. Any suggestions. Thanks Sal |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Launch external application
Assuming the IP address is in A1, I believe this should work
CalcTaskID = Shell(AppFile & " " & Range("A1").Text, vbNormalFocus) "SP" wrote: On Feb 26, 5:42 pm, "SP" wrote: I use excel to track information on a couple hundred switches and was wondering if the following is possible. Each row contains information on each switch including its IP address, is it possible to launch an external application and pass the IP address stored in the cell. The program I use is called putty and and I can launch it from the command line with "putty 10.3.14.19". Thanks Sal I have entered the following code and assigned it to an object: Sub ActivateCalculator() AppFile = "putty.exe" On Error Resume Next AppActivate "Putty" If Err < 0 Then CalcTaskID = Shell(AppFile, vbNormalFocus) If Err = 0 Then MsgBox "Unable to start the Calculator" End If End Sub This works, when I click on the object the application starts. I would like to pass the IP address stored in the cell to the application. Any suggestions. Thanks Sal |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Launch external application
On Feb 26, 6:38 pm, Vergel Adriano
wrote: Assuming the IP address is in A1, I believe this should work CalcTaskID = Shell(AppFile & " " & Range("A1").Text, vbNormalFocus) "SP" wrote: On Feb 26, 5:42 pm, "SP" wrote: I use excel to track information on a couple hundred switches and was wondering if the following is possible. Each row contains information on each switch including its IP address, is it possible to launch an external application and pass the IP address stored in the cell. The program I use is called putty and and I can launch it from the command line with "putty 10.3.14.19". Thanks Sal I have entered the following code and assigned it to an object: Sub ActivateCalculator() AppFile = "putty.exe" On Error Resume Next AppActivate "Putty" If Err < 0 Then CalcTaskID = Shell(AppFile, vbNormalFocus) If Err = 0 Then MsgBox "Unable to start the Calculator" End If End Sub This works, when I click on the object the application starts. I would like to pass the IP address stored in the cell to the application. Any suggestions. Thanks Sal I edited the code so it pulls the data from the active cell. Sub ActivatePutty() Worksheets("Hosts").Activate IP = ActiveCell.Value AppFile = "putty.exe" On Error Resume Next AppActivate "putty" If Err < 0 Then CalcTaskID = Shell(AppFile & " " & IP, vbNormalFocus) If Err = 0 Then MsgBox "Unable to start the Calculator" End If End Sub Thanks for the help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Launch Click Event Using Application.Run | Excel Discussion (Misc queries) | |||
Open an external application | Excel Discussion (Misc queries) | |||
Macro launch - Button vs Manual launch , has different results. | Excel Programming | |||
Close External Application using VBA | Excel Programming | |||
Launch an external telnet application | Excel Programming |