?
Solved

ActiveX Control link to html

Posted on 2000-01-14
1
Medium Priority
?
173 Views
Last Modified: 2010-05-02
i use activex control to implement my project. how i want to link to another html file after click command button or a picture?  Somebody please help me! thanks.
0
Comment
Question by:tonyckx
1 Comment
 
LVL 3

Accepted Solution

by:
halapaya earned 100 total points
ID: 2353656
if u are meaing that u want to show a html page in a browser after clicking a picture or button or something.

put this code in the click event

'decalre the api
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

Public Function HyperJump(ByVal URL As String) As Long
   HyperJump = ShellExecute(0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus)
End Function

'in ur button/picture click event
Private Sub Command1_Click()
   Call HyperJump("http://yahoo.com")
End Sub

this will open a browser and send the user to the http://yahoo.com

hope this helps

0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 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
Course of the Month4 days, 13 hours left to enroll

601 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