?
Solved

Excel Hyperlinks

Posted on 2012-03-10
2
Medium Priority
?
411 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
New style of hardware planning for Microsoft Exchange server.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

801 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