Make your own free website on

Create Internet Shortcut On Desktop

'Insert the following code to your form:

Private Sub Form_Load()
Dim URLFile As String
Dim URLTarget As String
Dim MyFileNum As Integer
'Replace Yahoo with your desirable shortcut's name
URLFile = "C:\Windows\Desktop\Yahoo.url"
'Replace with the address you want to link to
URLTarget = ""
MyFileNum = FreeFile
Open URLFile For Output As MyFileNum
Print #MyFileNum, "[InternetShortcut]"
Print #MyFileNum, "URL=" & URLTarget
Close MyFileNum
End Sub

Go Back