Thanks to everyone for your support. The following code gave me my first star and it was a good feeling to help somone else, so now I give stars even to old links. Anything that helps me. Once again Thanks everyone.
Create a form with a yes and no buttons
make reference to 'Windows Script Host Object Model'Its near the end
paste the following code
-------------------------------------------------------
Private Sub Command1_Click()
' yes click
CreateMyShortcut "C:\Program Files\PERT", "PERT.lnk"
End
End Sub
________________________________________________________
Private Sub Command2_Click()
' no click
End
End Sub
Public Sub CreateMyShortcut(strTarget As String, strShortCutName As String, Optional strStartIn As String = "", Optional strArguments As String = "")
Dim wsh As Object
Dim sf As Object
Dim Shortcut As Object
Set wsh = CreateObject("wscript.shell")
Set sf = wsh.SpecialFolders
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.