Solved

Cannot get hyperlink

Posted on 2003-10-23
4
274 Views
Last Modified: 2010-05-01
I want my app to be able to open internet explorer windows and send the users to an url. But i cant get Hyperlink.NavigateTo to work at all, I tried using this API call :

 Public Declare Sub HlinkNavigateString Lib "URLMON.dll" (ByVal pUnk As Long, ByVal szTarget As String)

but VB keeps crashing as if i were using the wrong arguments. Then i tried another API call and it said entry point not found.
0
Comment
Question by:towel401
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 30 total points
ID: 9609921
Create a project and add a textbox and a commandbutton.  Paste the code below into the form.  Type a URL into the text box and hit the button.

Private Declare Sub 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)

Private Sub Command1_Click()
        ShellExecute Me.hwnd, "open", Text1.Text, vbNullString, vbNullString, 1
End Sub
0
 
LVL 9

Expert Comment

by:Dang123
ID: 9609941
0
 
LVL 1

Expert Comment

by:burnttime
ID: 9615978
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

ShellExecute Me.hwnd, "open", "http://www.experts-exchange.com, "", "", 1
0
 
LVL 1

Expert Comment

by:burnttime
ID: 9615987
opps same code sry
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question