+ Reply to Thread
Results 1 to 2 of 2

Hyperlink to the same cell in a different sheet

  1. #1
    Registered User
    Join Date
    06-11-2010
    Location
    MA, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Hyperlink to the same cell in a different sheet

    How can I set up a macro which links a cell in one sheet to the same cell in another sheet ( e.g sheet1!C7 to sheet2!C7)?

    I have the following macro:

    currCell = ActiveCell.Address

    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
    "sheet2!" & currCell

    which would give me the link sheet2!$D$7, to which excel says "reference is not valid." Is there a way to take a relative, rather than absolute link from a selected cell, and would this relative link (sheet2!D7) be valid?

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Hyperlink to the same cell in a different sheet

    Your code works fine.

    are you sure your sheet names are valid. Can you post workbook where your code errors.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1