+ Reply to Thread
Results 1 to 3 of 3

Using Macros to copy information after a hyperlink selection

  1. #1
    Registered User
    Join Date
    05-11-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Using Macros to copy information after a hyperlink selection

    Hello!

    I am new to recording macros and I don't understand how I can adjust my macro to do a task for me. Here's what I want the little guy to do:

    When I click on a cell that contains a hyperlink reference, the macro should follow the reference, select the cell directly beneath the referred cell, and copy that information to another cell in another worksheet.

    This is what I have so far, but the selection is too specific (the range is highlighted). How do I just say, "select one cell below the referred cell"?

    Also, how can it be copied to the next empty cell, can I specify a particular row and tell it to fill down beginning from the top?

    Please Login or Register  to view this content.
    Last edited by copypaste; 05-12-2010 at 04:00 PM. Reason: following forum rules :0)

  2. #2
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: Using Macros to copy information after a hyperlink selection

    First off: read the forum rules and change your post accordingly (use
    Please Login or Register  to view this content.
    for example
    Please Login or Register  to view this content.

    anyway.. don't use "select" in macros if you can avoid it.
    when you record a macro, it uses a lot of select statements, because it records what you do. - and you select something.
    a better code would be something like
    Please Login or Register  to view this content.
    Last edited by wamp; 05-12-2010 at 03:42 PM.
    _______________________________________________
    Remember:

    Read the rules!

    Use code tags! Place [CODE] before the first line of code and [/CODE] after the last line of code.

    Mark your post [SOLVED] if it has been answered satisfactorily.
    To do this, click EDIT in your original post, click GO ADVANCED and set the PREFIX. It helps everybody!

    If you are approve (or disapprove) of any members response to your problem, please click the star icon underneath their post and comment. It matters.

  3. #3
    Registered User
    Join Date
    05-11-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Using Macros to copy information after a hyperlink selection

    Wow! What an improvement, however before I begin to use this macro, will it still copy within that specific A335:H335 range, or should I remove that line?

+ 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