How do I make a link from my program that's been open in internet explorer ??
Printable View
How do I make a link from my program that's been open in internet explorer ??
Try this. Make a Form with a CommandButton and put the following code into the Form.
Code:Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
'Open www.vb-world.net
Retval = ShellExecute(0&, vbNullString, "www.vb-world.net", vbNullString, "C:\", 1)
End Sub
Thanks. I'll try it.
If you only are concerned with opening it in IE then this might work also:
This code will navigate the urls that you place in Text1.TextCode:'Place this under a command button
Dim IE as String
Set IE = CreateObject("internetexplorer.application")
IE.Visible=True
IE.Navigate(Text1.Text)
Hope that helped,
D!m
Ps. Maybe you better listen to Magatron, he knows better.