Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
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
Launch Click Event Using Application.Run cellist Excel Discussion (Misc queries) 4 November 5th 09 12:46 AM
Open an external application PaulW Excel Discussion (Misc queries) 8 November 16th 06 05:12 PM
Macro launch - Button vs Manual launch , has different results. Wayne Excel Programming 4 February 23rd 05 11:33 AM
Close External Application using VBA ZABU Excel Programming 9 June 8th 04 03:33 AM
Launch an external telnet application EC[_3_] Excel Programming 0 November 5th 03 06:08 PM


All times are GMT +1. The time now is 10:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"