Solved

Cannot get hyperlink

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…
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…

785 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