Solved

Webpage Redirection

Posted on 2006-11-15
1
225 Views
Last Modified: 2011-04-14
Is it possible to open up and redirect a browser to a new page using visual basic? I have a button that when pressed has all kinds of things happening and then redirects you to a webpage.

Thanks,
Nik
0
Comment
Question by:NP2322
1 Comment
 
LVL 76

Accepted Solution

by:
David Lee earned 250 total points
ID: 18015513
I'm not clear on what you mean by "redirect".  It's possible to open a browser and navigate to a given page (i.e. URL) from within VB.  Is that what you have in mind?  If so, then the code fragment below demonstrates how to do this.

    Set objIE = CreateObject("InternetExplorer.Application")
    objIE.Navigate2 "http://www.yahoo.com"
    Do While objIE.readyState <> 4
        DoEvents
    Loop
    objIE.Visible = True
    Set objIE = Nothing
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 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