+ Reply to Thread
Results 1 to 1 of 1

Auto Hyperlink to newest worksheet in workbook?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-07-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Auto Hyperlink to newest worksheet in workbook?

    Hello Everyone, I have a problem and it seems like this is definitely the forum to find the help I need.

    I have a workbook with several worksheets that I use to manage files. I use this workbook to keep track of a certain type of file as well as quick refernce information. Each file is basically given a profile in the form of a separate worksheet. With each new file a new worksheet is created and their information is entered.

    Specifically my workbook contains worksheets named "names," "allowance," and "template." In the "template" cell C2 is the name of the file. I have been successful so far in creating a macro that will copy all of the information from the "template," it then creates a new worksheet and renames that worksheet with the name from cell C2. The Macro then takes the same name from C2 and enters it into cell B10 on the "names" worsksheet, then arranges all file names in the "names" workssheet alphabetically so that all new files are always arranged alphabetically. I cannot seem to get the macro to hyperlink correctly for me though.

    What I would like for it to be able to do is for the name that has just been pasted into cell B10 of the "names" worksheet, I would like it to auto hyperlink to the worksheet that was just created for that file right before it arranges alphabetically. Or put another way, I would like the macro to paste the name into cell B10, hyperlink to the worksheet that was just created for that file, and then arrange the data alphabetically.

    My problem lies here: (I've used "Test Name" as the name)
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
    "'Test Name'!A1", TextToDisplay:="Test Name"
    I created this code by turning on the Macro recorder, selecting the box to hyperlink to, selcting add hyperlink, then selecting the correct worksheet.

    With this, I end up with every new name linking to the same worksheet instead of the correct worksheet. I need the SubAddress to link to either the newest worksheet or the worksheet that matches the name in the box. I also need the TextToDisplay to just stay as what is already in the box.

    Sorry if this is not clear, please let me know all of your questions,

    Thanks!
    Last edited by lunatyk05; 03-07-2014 at 05:36 PM.

+ 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. Excel VBA find newest worksheet based on date/time stamp in worksheet name?
    By takchin.tc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-27-2012, 03:56 PM
  2. Replies: 5
    Last Post: 07-20-2012, 05:05 AM
  3. Activate the highest/newest worksheet in a workbook
    By Belgarath75 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-21-2011, 08:31 PM
  4. Auto Create Hyperlink and move to another workbook
    By Ninjai in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-10-2010, 03:16 AM
  5. hyperlink - auto update from worksheet names
    By RosieG in forum Excel General
    Replies: 0
    Last Post: 08-25-2006, 01:24 AM

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