+ Reply to Thread
Results 1 to 6 of 6

Extend a VBA macro with a hyperlinks table

  1. #1
    Forum Contributor
    Join Date
    02-18-2013
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    221

    Extend a VBA macro with a hyperlinks table

    Hello!

    I want to add following functionality to a vba macro. The program collects data from different sheets and writes it into a single sheet. The layout is like this:

    Please Login or Register  to view this content.
    In total, I have 12 data blocks with titles. There is always a blank line between the data blocks. Now, I want to add hyperlinks to the title cells A2, A18 etc. These hyperlinks should be in the cells N10, N11, N12 and so on. Also, N10 should contain the text information in A2.
    So: if A2 contains the text "Title1", I would want to have a hyperlink in N10 called "Title 1" and jump to A2 when clicking N10.

    It would be great, if the macro would be handle a random number of data blocks, so that I wouldn't have to tell beforehand how many blocks I have.

    Do you have any ideas how to do this? Thank you very much!

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Extend a VBA macro with a hyperlinks table

    Hi excelactuary

    Any chance of a sample workbook depicting your requirement.

    Edit: Not to worry, see if this is what you require:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by sintek; 04-24-2017 at 05:07 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    02-18-2013
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    221

    Re: Extend a VBA macro with a hyperlinks table

    Hello sintek!

    Thank you so much, your code does exactly what I wanted. In the future, I will post a workbook sample.

    One more question: if I want to add custom text in the cell N9, what would I add to the code?

    Edit:

    Got it:

    Please Login or Register  to view this content.
    Last edited by excelactuary; 04-24-2017 at 05:35 AM.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Extend a VBA macro with a hyperlinks table

    if I want to add custom text in the cell N9
    ...Don't you mean custom text in N10, N11 etc
    If so change this line of code
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    or do you just want to add a heading in N9.

  5. #5
    Forum Contributor
    Join Date
    02-18-2013
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    221

    Re: Extend a VBA macro with a hyperlinks table

    I just want a heading in N9.

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Extend a VBA macro with a hyperlinks table

    add this line
    Please Login or Register  to view this content.
    under
    Please Login or Register  to view this content.
    Glad I could help. thanks for rep points.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto Extend Table linked with another table
    By azmat119 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2017, 03:51 PM
  2. Auto Extend Table linked with another table
    By azmat119 in forum Excel General
    Replies: 1
    Last Post: 02-09-2017, 02:35 PM
  3. Auto Extend Table linked with another table
    By azmat119 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-09-2017, 06:37 AM
  4. Making Table of Content with hyperlinks in a PDF using a macro of excel
    By biguel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-11-2016, 10:22 AM
  5. Macro to extend a table range
    By qaliq in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2013, 09:38 AM
  6. [SOLVED] remove hyperlinks in macro affected format table
    By rickmeister in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-03-2013, 12:58 PM
  7. I would like to extend hyperlinks across cells
    By venkat in forum Excel General
    Replies: 2
    Last Post: 05-20-2005, 11:06 PM

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