Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 6th, 2005, 07:05 AM
Authorized User
 
Join Date: Jan 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hyperlinks

Hi, everyone!
Whilst the following hyperlink codes work -
  With Worksheets(1).hyperlinks.add range("B2"), address:= "http://www.yahoo.com.", _ Screentip:= "Best Site", Texttodisplay:= "The Homepage"
 End With -

 I cannot get the address right when I want to add the hyperlink on
Range ("c2"), worksheet(2). When I click on this Range("c2"), it should direct me to the link at Sheet3!B2.
  Is there a shorter and faster way to create a hyperlink code that can connect to a specific location within the same Workbook that I want it to be without using Worksheet Functions?
   
 
Old February 7th, 2005, 12:55 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Chin,

Is this what you are looking for?

    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
        "Sheet1!H20", TextToDisplay:="goto Cell H20"

Change the subaddress to either a parameter that changes with the cell content.

Cheers

Matthew

 
Old February 13th, 2005, 04:50 AM
Authorized User
 
Join Date: Jan 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi , Matthew !
    It should be what you have been given me, and that was what I read from books, but I cannot get it anchored to "C2".
Could you please show me an example on how to cahnge the subaddress that changes with the cell content?
   I am bit dumb here.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlinks stephens1982 HTML Code Clinic 1 August 29th, 2005 12:13 AM
hyperlinks in XSLT, please help. figit XSLT 1 May 6th, 2005 03:06 AM
hyperlinks style scrowler CSS Cascading Style Sheets 8 January 20th, 2005 09:13 AM
hyperlinks sbhandar Classic ASP Basics 4 August 19th, 2004 09:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.