Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a shortcut file

Status
Not open for further replies.

Hm786

Programmer
Apr 5, 2001
88
0
0
US
Hi,

I am trying to create a shortcut file from vb code. I am using the WshShell object but I am getting error message. What dll should I install on my machine.


Thank You,
Sincerely,
Hamida
 
If you could post the code you are using, and the specific error message you are receiving, then we might actually be able to help you.
 
Set WshShell = WScript.CreateObject("WScript.Shell") this to create and instantiate the WshShell object which I am not able to

Set oShortcut = WshShell.CreateShortcut(sShortcutPath) this to creating the shortcut

My code passes through the Wshshell but gives me the internal error that some install needed.

Thank You,
Hamida
 
Unless you are executing this code inside VBScript, the first line should read:
Code:
Set WshShell = CreateObject("WScript.Shell")

Also, more of your code, along with the value being passed to the string variable sShortcutPath, and finally, the EXACT error message you are receiving. If you tell us that you are getting an error message that tells you something or other, like "some install needed", then all we can tell you is that there is "something wrong" with your code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top