Solved

Cannot get hyperlink

Posted on 2003-10-23
4
276 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

688 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