How do I execute command from button or hyperlink?

R

rerhart

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
 
E

Earl Kiosterud

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top