LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Pass cell contents to MSTSC.EXE (Remote Desktop)

I currenlty have 175 sites of network addresses (1 site per sheet). Each sheet has the IP address I need to connect to in cell B3.

I have a command button that opens Remote Desktop to connect to this address, but I have had to type the address manually into the VBA for each sheet.

I am trying to pass the address value in cell B3 to the VBA for the command button.
(w.x.y.z is the IP address of the target system)

I have tried setting a variable to the contents of cell B3, but can not pass it to mstsc.exe command line

Thnaks in advance for assistance with this

ex:

Private Sub CommandButton1_Click()
Dim RetVal

' Run Remote Desktop.
RetVal = Shell("c:\windows\system32\mstsc.exe /v:w.x.y.z", 1)
End Sub


EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
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
EXCEL FILES SAVED TO DESKTOP WILL NOT OPEN FROM DESKTOP randy111 Excel Discussion (Misc queries) 3 January 13th 08 10:38 PM
Pass contents of a cell to a macro Steve Excel Programming 3 February 17th 06 10:56 AM
Display cell contents permanently on desktop Tracy Excel Discussion (Misc queries) 0 January 26th 06 05:47 PM
Pass cell contents to external program as commandline option Research freak Excel Discussion (Misc queries) 1 September 16th 05 11:03 PM
Application.SendKeys won't work with Remote Desktop???? WildIrish Excel Programming 1 March 10th 05 02:48 PM


All times are GMT +1. The time now is 04:02 AM.

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

About Us

"It's about Microsoft Excel"