Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
rerhart
 
Posts: n/a
Default How do I execute command from button or hyperlink?


I am not a scripting expert and would like to click on a cell, like with
a hyperlink or a button (in that cell is the name of a server), and by
clicking on that button or hyperlink, perform the following command
that I currently have in a batch file:

start /D "c:\winnt\system32\" /b mstsc /v:servername /f

I currently have a list of servers with each cell hyperlinked to a
batch file but would like to eliminate the batch files and somehow
incorporate the functionality of the batch file into Excel. This batch
file simply opens a Terminal Services session with a server.

Thanks!
Rich


--
rerhart
------------------------------------------------------------------------
rerhart's Profile: http://www.excelforum.com/member.php...fo&userid=8138
View this thread: http://www.excelforum.com/showthread...hreadid=346876

  #2   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Rich,

Try this. Untested. If you make a button, make the following macro, and
assign the button to the macro (right-click - assign macro).

Sub StartTerminalServer
Shell "start /D c:\winnt\system32\ /b mstsc /v:servername /f"
End Sub

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"rerhart" wrote in message
...

I am not a scripting expert and would like to click on a cell, like with
a hyperlink or a button (in that cell is the name of a server), and by
clicking on that button or hyperlink, perform the following command
that I currently have in a batch file:

start /D "c:\winnt\system32\" /b mstsc /v:servername /f

I currently have a list of servers with each cell hyperlinked to a
batch file but would like to eliminate the batch files and somehow
incorporate the functionality of the batch file into Excel. This batch
file simply opens a Terminal Services session with a server.

Thanks!
Rich


--
rerhart
------------------------------------------------------------------------
rerhart's Profile:
http://www.excelforum.com/member.php...fo&userid=8138
View this thread: http://www.excelforum.com/showthread...hreadid=346876



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
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 25th 05 11:28 PM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM
Removing hyperlink Frank Marousek Excel Discussion (Misc queries) 3 January 12th 05 09:53 PM
command button moves Stuart Excel Discussion (Misc queries) 2 December 15th 04 05:56 PM


All times are GMT +1. The time now is 07:26 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"