Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel Hyperlinks

Posted on 2012-03-10
2
Medium Priority
?
418 Views
Last Modified: 2012-03-11
Hi Guys
I am using Excel 2003
I have this order-form on an Excel spreadsheet (see image attachment)
I would like to enable a user to view the image of a selected item.
Images are available my website www.mywebsite.com
The user is supposed to select the 'item_no' cell and click a button labeled 'View-Image' (see attached cell B9 is selected)

Image url is "http://www.mywebsite.com/images/" + ltrim(Str(ActiveCell.value))+".jpg"
I would like the code for the click event for the View-Image button to produce a webpage with the selected item image.
Is this senario workable?
If yes what should be the code of the 'on_click' event for the View-Image Button?
I was experimenting but could not get it to work.
Your help is appreciated.
Thanks
Dory
Ssheet-image.jpg
0
Comment
Question by:dory550
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Accepted Solution

by:
Curt Lindstrom earned 2000 total points
ID: 37705927
Try something like this
Sub View_Image_Click()

    ActiveCell.Select
    With Worksheets(1)

    .Hyperlinks.Add .Range("Q16"), "http://www.mywebsite.com/images/" + LTrim(Str(ActiveCell.Value)) + ".jpg"
    End With
    Range("Q16").Select
    Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub

Open in new window

Q16 can be changed to any cell you want in the spreadsheet hidden from the user.

Test in attached file

Curt
View-Image.xls
0
 

Author Closing Comment

by:dory550
ID: 37706585
epaclm:
It worked like a charm
Thank you for your help
Dory
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
New style of hardware planning for Microsoft Exchange server.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

636 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