?
Solved

Cannot get hyperlink

Posted on 2003-10-23
4
Medium Priority
?
286 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 90 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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…
Suggested Courses

765 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