+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Sending Cell Data on Hyperlink Click

  1. #1
    Registered User
    Join Date
    08-21-2011
    Location
    Perrysville, IN USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Sending Cell Data on Hyperlink Click

    I have a column with a large number of rows that contain activity numbers - 1 activity number for each cell. Each of these cells has a hyperlink set, so that when the user clicks on the link, they are taken to a different cell in the same sheet.
    I wanted to be able to send the cells data (the activity number) to the destination cell.

    For example:
    C2 = 1-YKCQ8O8
    C3 = 1-YRSRNMB
    C4 = 1-Z1AGVE0

    M5 is my destination cell.

    I hoping to be able to get cell M5 to display 1-YKCQ8O8 if I click on that link in cell C2.
    But, M5 has to be able to display 1-Z1AGVE0 if I click on the link in cell C4, etc.

    Any ideas?

    While searching for an answer, I was able to find this:

    Please Login or Register  to view this content.
    That would do nothing for the the clickable hyperlink, but if you double-clicked the cell, it would send the data to cell M5.

    Any help would be greatly appreciated.
    Last edited by bush1282; 08-22-2011 at 09:05 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Sending Cell Data on Hyperlink Click

    This will work
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-21-2011
    Location
    Perrysville, IN USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Sending Cell Data on Hyperlink Click

    WOW, Dave - Thanks. That worked great!

    I am quite familiar with VB for developing desktop applications, however this is the first time I have done anything with excel. Could you go into a little detail with the code on what is doing what?
    Just for my personal knowledge - As in:

    Application.Intersect
    Cancel = True
    rng = Target

    Just hoping for a little clarification on what that is - but as far as the problem I was having...that absolutely fixed it.
    Thank you so much!

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Sending Cell Data on Hyperlink Click

    Application.Intersect - determins the target range
    Cancel = True - when you double click a cell, excel wants you to edit the cell, this stops that from happening.
    rng = Target
    - we set rng to be range("M5"), when you double click a cell in the target range, M5 is equal to the cell double clicked..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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