Results 1 to 3 of 3

Thread: Open a website

  1. #1
    Join Date
    Jan 2011

    Unanswered: Open a website

    I would like to open a website upon the double click event of a text box. What is the code to place behind the text box?

    for example, the website I would link to maybe:

    BBC - Homepage

    Thanks for your time.

  2. #2
    Join Date
    Jan 2009
    Kerala, India
    You may use the Hyperlink Address Property of a Label or a Command Button to enter the URL, rather than using the Textbox. If you are using a Label control then enter some Text in the Caption property also.

    If you prefer VBA Code, then run the following code from a Command Button Click Event Procedure:

    Private Sub Command4_Click()
    Dim ie As Object, urlAddress As String
    urlAddress = ""
    Set ie = CreateObject("InternetExplorer.Application")
    Application.FollowHyperlink urlAddress, , True
    ie.Visible = True
    ie.navigate urlAddress
    Set ie = Nothing
    End Sub (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

  3. #3
    Join Date
    Jan 2011
    Thanks very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts