Hello,
Here is my situation. I have a excel sheet with Server names in Column A and Passwords in Column B. I want to be able to highlight a server name in Column A and run a shortcut key e.g. Ctrl + K to launch a RDP session automatically.
The RDP session should read the active cell's Server name and the corresponding password and connect. Is this possible?
I have added references to Microsoft Terminal Services ActiveX Client Library to do this, but it doesnt work. When I run the Macro I nothing shows up. Has anyone done something similar? Here is how far I have progresssed.
Any pointers in the right direction will help?
Thanks.
Here is my situation. I have a excel sheet with Server names in Column A and Passwords in Column B. I want to be able to highlight a server name in Column A and run a shortcut key e.g. Ctrl + K to launch a RDP session automatically.
The RDP session should read the active cell's Server name and the corresponding password and connect. Is this possible?
I have added references to Microsoft Terminal Services ActiveX Client Library to do this, but it doesnt work. When I run the Macro I nothing shows up. Has anyone done something similar? Here is how far I have progresssed.
Code:
Sub ConnectToTSC()
Dim Tsc As MSTSCLib.IMsRdpClient2
Set Tsc = New MSTSCLib.MsRdpClient2
Tsc.Server = ActiveCell.Value
Tsc.UserName = "myUsername"
Tsc.AdvancedSettings2.ClearTextPassword = ActiveCell.Offset(0, 1).Value
Tsc.Domain = "myDomain"
Tsc.SecuredSettings2.StartProgram = _
"C:\Program Files\Microsoft office\OFFICE11\EXCEL.EXE"
Tsc.Connect
End Sub
Any pointers in the right direction will help?
Thanks.