Results 1 to 7 of 7

Thread: Linking URL to an image control

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    Raleigh
    Posts
    7

    Question

    Hi Guys,

    New to VB. I would to link a URL to an image control. When user clicks on image it needs to open that(linked) web page. Can anybody help me in writing this code.

    Thanks for your help.


  2. #2
    Guest
    <a href="http://www.vb-world.net"><IMG SRC="http://www.vb-world.net/images/vbworld.gif"></a>

    And if you want the link to go somewhere else, set the target.

    <a href="http://www.vb-world.net" target="_blank"><IMG SRC="http://www.vb-world.net/images/vbworld.gif"></a>

    ^This will open it in a new window.


  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    Raleigh
    Posts
    7

    Question That's not it

    I am not trying to open that link from a web browser. I got an VBA application wizard where I put the image control. When I click that image it needs to open the web browser and go to that url address.

  4. #4

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    Raleigh
    Posts
    7
    I am not sure. I don't think it has anything to do with Shell.

  5. #5
    Guest
    Oh, because I thought maybe it'd be something like this:

    Code:
    Private Sub Image1_Click()
    Shell "C:\Program Files\Internet Explorer\IExplore.exe http://www.vb-world.net", vbNormalFocus
    End Sub

  6. #6

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    Raleigh
    Posts
    7

    Smile Thank you

    Thanks very much Matt. It worked.

  7. #7
    Guest

    Thumbs up It worked!?

    Wow, I just guessed .
    I figured VBA would have the Shell function .
    And Image1_Click..also a guess. Didn't know that was there.

    I remember seeing VBA at school though. Didn't know how to work it though. I guess I'll ask my teacher and hope she knows. She probably doesn't, but than again, a lot of teacher's teach computer classes and don't know sh*t about computers .

Posting Permissions

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



Click Here to Expand Forum to Full Width