ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to start an RDP seesion by clicking link. (https://www.excelbanter.com/excel-programming/388621-how-start-rdp-seesion-clicking-link.html)

Michael

How to start an RDP seesion by clicking link.
 
I want to have a spreadsheet that list PCs etc. and have a clickable link
that starts a rdp file (so it keeps the username and pass) not just start
mstsc.exe.
I would like to have the text editable so when someone else use it they can
change the locaiton of the rdp files.
I tried objects but cant edit by search and replace.
Tried hyperlink with c:\windows\system32\mstsc.exe
c:\Users\Documents\KCMSD\RDP\askew.rdp
wont start
tried cmd but cant pass rdp file to it.
tried link to rdp and excel say program not associated with it.

Any help

Vergel Adriano

How to start an RDP seesion by clicking link.
 
Michael,

How about a button instead of a hyperlink? assign a macro like this to the
button.

Sub Button1_Click()
Shell "mstsc D:\TEST.RDP", vbNormalFocus
End Sub

You can make the RDP file variable by getting it from a cell in the
worksheet instead of hard coding in the macro..


--
Hope that helps.

Vergel Adriano


"Michael" wrote:

I want to have a spreadsheet that list PCs etc. and have a clickable link
that starts a rdp file (so it keeps the username and pass) not just start
mstsc.exe.
I would like to have the text editable so when someone else use it they can
change the locaiton of the rdp files.
I tried objects but cant edit by search and replace.
Tried hyperlink with c:\windows\system32\mstsc.exe
c:\Users\Documents\KCMSD\RDP\askew.rdp
wont start
tried cmd but cant pass rdp file to it.
tried link to rdp and excel say program not associated with it.

Any help


Michael

How to start an RDP seesion by clicking link.
 
Hey I like that idea and it did start a specific file up ok.
Now, how do I use the text that is in the selected cell.
Or, have multiple buttons that will reference the cell that is in that same
row.

Thanks for helping a newbie!

"Vergel Adriano" wrote:

Michael,

How about a button instead of a hyperlink? assign a macro like this to the
button.

Sub Button1_Click()
Shell "mstsc D:\TEST.RDP", vbNormalFocus
End Sub

You can make the RDP file variable by getting it from a cell in the
worksheet instead of hard coding in the macro..


--
Hope that helps.

Vergel Adriano


"Michael" wrote:

I want to have a spreadsheet that list PCs etc. and have a clickable link
that starts a rdp file (so it keeps the username and pass) not just start
mstsc.exe.
I would like to have the text editable so when someone else use it they can
change the locaiton of the rdp files.
I tried objects but cant edit by search and replace.
Tried hyperlink with c:\windows\system32\mstsc.exe
c:\Users\Documents\KCMSD\RDP\askew.rdp
wont start
tried cmd but cant pass rdp file to it.
tried link to rdp and excel say program not associated with it.

Any help


Michael

How to start an RDP seesion by clicking link.
 
Actually, even better would be if I could have the locaiton of the files
specified in one cell like L1 that would be c:\user\me\rdp\ and then in A1,
A2, etc. have the name of the location office1, office2, etc.
So then if you had the office1 cell selected and hit the macro button it
would combine them and tack on .rdp to get c:\user\me\rdp\office1.rdp and
execute that.
Then if someone else used they could put c:\user\you\rdp\ in L1 and the
macro would execute c:\user\you\rdp\office1.rdp for them.

Can you tell me exactly all the steps to do that?

Again sorry for being such a newb.

"Michael" wrote:

Hey I like that idea and it did start a specific file up ok.
Now, how do I use the text that is in the selected cell.
Or, have multiple buttons that will reference the cell that is in that same
row.

Thanks for helping a newbie!

"Vergel Adriano" wrote:

Michael,

How about a button instead of a hyperlink? assign a macro like this to the
button.

Sub Button1_Click()
Shell "mstsc D:\TEST.RDP", vbNormalFocus
End Sub

You can make the RDP file variable by getting it from a cell in the
worksheet instead of hard coding in the macro..


--
Hope that helps.

Vergel Adriano


"Michael" wrote:

I want to have a spreadsheet that list PCs etc. and have a clickable link
that starts a rdp file (so it keeps the username and pass) not just start
mstsc.exe.
I would like to have the text editable so when someone else use it they can
change the locaiton of the rdp files.
I tried objects but cant edit by search and replace.
Tried hyperlink with c:\windows\system32\mstsc.exe
c:\Users\Documents\KCMSD\RDP\askew.rdp
wont start
tried cmd but cant pass rdp file to it.
tried link to rdp and excel say program not associated with it.

Any help


Vergel Adriano

How to start an RDP seesion by clicking link.
 
Hi Michael,

If the path will be in L1. And the user will select a cell which will have
the name of the RDP file without the .RDP file extension. One way to do it
would be like this:

Shell "mstsc " & Range("L1").Text & ActiveCell.Text & ".RDP", vbNormalFocus


--
Hope that helps.

Vergel Adriano


"Michael" wrote:

Actually, even better would be if I could have the locaiton of the files
specified in one cell like L1 that would be c:\user\me\rdp\ and then in A1,
A2, etc. have the name of the location office1, office2, etc.
So then if you had the office1 cell selected and hit the macro button it
would combine them and tack on .rdp to get c:\user\me\rdp\office1.rdp and
execute that.
Then if someone else used they could put c:\user\you\rdp\ in L1 and the
macro would execute c:\user\you\rdp\office1.rdp for them.

Can you tell me exactly all the steps to do that?

Again sorry for being such a newb.

"Michael" wrote:

Hey I like that idea and it did start a specific file up ok.
Now, how do I use the text that is in the selected cell.
Or, have multiple buttons that will reference the cell that is in that same
row.

Thanks for helping a newbie!

"Vergel Adriano" wrote:

Michael,

How about a button instead of a hyperlink? assign a macro like this to the
button.

Sub Button1_Click()
Shell "mstsc D:\TEST.RDP", vbNormalFocus
End Sub

You can make the RDP file variable by getting it from a cell in the
worksheet instead of hard coding in the macro..


--
Hope that helps.

Vergel Adriano


"Michael" wrote:

I want to have a spreadsheet that list PCs etc. and have a clickable link
that starts a rdp file (so it keeps the username and pass) not just start
mstsc.exe.
I would like to have the text editable so when someone else use it they can
change the locaiton of the rdp files.
I tried objects but cant edit by search and replace.
Tried hyperlink with c:\windows\system32\mstsc.exe
c:\Users\Documents\KCMSD\RDP\askew.rdp
wont start
tried cmd but cant pass rdp file to it.
tried link to rdp and excel say program not associated with it.

Any help


Michael

How to start an RDP seesion by clicking link.
 
Your are Fantastic!
That worked,
Thanks so much.

"Vergel Adriano" wrote:

Hi Michael,

If the path will be in L1. And the user will select a cell which will have
the name of the RDP file without the .RDP file extension. One way to do it
would be like this:

Shell "mstsc " & Range("L1").Text & ActiveCell.Text & ".RDP", vbNormalFocus


--
Hope that helps.

Vergel Adriano


"Michael" wrote:

Actually, even better would be if I could have the locaiton of the files
specified in one cell like L1 that would be c:\user\me\rdp\ and then in A1,
A2, etc. have the name of the location office1, office2, etc.
So then if you had the office1 cell selected and hit the macro button it
would combine them and tack on .rdp to get c:\user\me\rdp\office1.rdp and
execute that.
Then if someone else used they could put c:\user\you\rdp\ in L1 and the
macro would execute c:\user\you\rdp\office1.rdp for them.

Can you tell me exactly all the steps to do that?

Again sorry for being such a newb.

"Michael" wrote:

Hey I like that idea and it did start a specific file up ok.
Now, how do I use the text that is in the selected cell.
Or, have multiple buttons that will reference the cell that is in that same
row.

Thanks for helping a newbie!

"Vergel Adriano" wrote:

Michael,

How about a button instead of a hyperlink? assign a macro like this to the
button.

Sub Button1_Click()
Shell "mstsc D:\TEST.RDP", vbNormalFocus
End Sub

You can make the RDP file variable by getting it from a cell in the
worksheet instead of hard coding in the macro..


--
Hope that helps.

Vergel Adriano


"Michael" wrote:

I want to have a spreadsheet that list PCs etc. and have a clickable link
that starts a rdp file (so it keeps the username and pass) not just start
mstsc.exe.
I would like to have the text editable so when someone else use it they can
change the locaiton of the rdp files.
I tried objects but cant edit by search and replace.
Tried hyperlink with c:\windows\system32\mstsc.exe
c:\Users\Documents\KCMSD\RDP\askew.rdp
wont start
tried cmd but cant pass rdp file to it.
tried link to rdp and excel say program not associated with it.

Any help


Michael

How to start an RDP seesion by clicking link.
 
Sorry to bug again.
When I have a cell with 2 words like "White House" it only puts the second
word in the string.
I'm sure its a simple fix like "" or something.
THANKS

"Michael" wrote:

Your are Fantastic!
That worked,
Thanks so much.

"Vergel Adriano" wrote:

Hi Michael,

If the path will be in L1. And the user will select a cell which will have
the name of the RDP file without the .RDP file extension. One way to do it
would be like this:

Shell "mstsc " & Range("L1").Text & ActiveCell.Text & ".RDP", vbNormalFocus


--
Hope that helps.

Vergel Adriano


"Michael" wrote:

Actually, even better would be if I could have the locaiton of the files
specified in one cell like L1 that would be c:\user\me\rdp\ and then in A1,
A2, etc. have the name of the location office1, office2, etc.
So then if you had the office1 cell selected and hit the macro button it
would combine them and tack on .rdp to get c:\user\me\rdp\office1.rdp and
execute that.
Then if someone else used they could put c:\user\you\rdp\ in L1 and the
macro would execute c:\user\you\rdp\office1.rdp for them.

Can you tell me exactly all the steps to do that?

Again sorry for being such a newb.

"Michael" wrote:

Hey I like that idea and it did start a specific file up ok.
Now, how do I use the text that is in the selected cell.
Or, have multiple buttons that will reference the cell that is in that same
row.

Thanks for helping a newbie!

"Vergel Adriano" wrote:

Michael,

How about a button instead of a hyperlink? assign a macro like this to the
button.

Sub Button1_Click()
Shell "mstsc D:\TEST.RDP", vbNormalFocus
End Sub

You can make the RDP file variable by getting it from a cell in the
worksheet instead of hard coding in the macro..


--
Hope that helps.

Vergel Adriano


"Michael" wrote:

I want to have a spreadsheet that list PCs etc. and have a clickable link
that starts a rdp file (so it keeps the username and pass) not just start
mstsc.exe.
I would like to have the text editable so when someone else use it they can
change the locaiton of the rdp files.
I tried objects but cant edit by search and replace.
Tried hyperlink with c:\windows\system32\mstsc.exe
c:\Users\Documents\KCMSD\RDP\askew.rdp
wont start
tried cmd but cant pass rdp file to it.
tried link to rdp and excel say program not associated with it.

Any help



All times are GMT +1. The time now is 11:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com