Solved

Cannot get hyperlink

Posted on 2003-10-23
4
266 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
  • 2
4 Comments
 
LVL 85

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now