VBA open desktop application !!

Ks1102

Well-known Member
Joined
Jan 8, 2008
Messages
689
Hi, all
does it possible to have vba code which can call and open the application which located at PC desktop ?
please help and advice?
thanks very much .
 
Hi, all
does it possible to have vba code which can call and open the application which located at PC desktop ?
please help and advice?
thanks very much .

I find the code which searched by MrExcel who's Hermanito provided below.
but i don't how MOD what i to used ...
example :desktop located is "C:\Documents and Settings\Kenneth\Desktop"
file to open is " apac.zmd"
please help how to modify. thxxx
Code:
Sub Test()
    Dim FileName As String
    FileName = Environ("USERPROFILE") & "\Desktop\" & "test.lnk"
    FileName = "Excel " & """" & FileName & """"
    Call Shell(FileName, vbHide)
End Sub
 
Upvote 0
Hi there,

What is it exactly that is on the desktop? Is it a shortcut to a file, or the file itself? Also, what type of file is it, or if a shortcut, what type of file does the shortcut point to?

Mark
 
Upvote 0
Hi there,

What is it exactly that is on the desktop? Is it a shortcut to a file, or the file itself? Also, what type of file is it, or if a shortcut, what type of file does the shortcut point to?

Mark

Hi GTO
Thanks you read,
the shortcut is application itself.
 
Upvote 0
Hi GTO
Thanks you read,
the shortcut is application itself.

I am afraid I may be misunderstanding. Is it a shortcut to an application? That is, you click on it and it runs an application, such as Excel? If so, what application are we wanting the code to run?
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top