Link to home
Start Free TrialLog in
Avatar of katdude
katdude

asked on

Browser Control

In a recent project, I opend an html file by clicking on a button on one of my forms.

I used this and it works:
---------------------------------------------------------
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

option explicit
---------------------------------------------------------

Private Sub mnuFilePrintPreview_Click()

'The purpose is so reports can be printed.
             Dim stFile As String
                  stFile = "C:\TESTFILE.doc"
             ShellExecute Me.hwnd, "open", stFile, vbNullString, vbNullString, 2
End Sub
---------------------------------------------------------

Now I am trying to acces a website using the same code as above, but It does not even open internet explorer.

What do I need to open an internet site by using a Click Event???
ASKER CERTIFIED SOLUTION
Avatar of SashiJanahan
SashiJanahan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Crazy_king_in
Crazy_king_in

Hi
Otherwise u can use the Web Browse control to open the Web in VB window itself
The control name is Microsoft Internet control
Place the web browser in ur form
to open a page
webbrowser1.navigate "www.yahoo.com"
Good Luck
Avatar of DanRollins
Hi katdude,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept SashiJanahan's comment(s) as an answer.

katdude, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept THIS comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer