Avatar of Escanaba
Escanaba
Flag for United States of America asked on

Excel 2007 VBA to Update Hyperlinks

Hello,

I have a spreadsheet which contains multiple hyperlinks in column B that are linked to various worksheets in the same workbook.  For some reason, the links are changing to the wrong worksheets constantly and require manual editing.

All of text in column B matches the name of a worksheet.  For example, in cell B2 the hyperlink text is RIA0000 and there is a worksheet also named RIA0000 that its suppose to link to.

Is it possible to run a macro that will look at each cell in column B (starting at B2), and if there is a hyperlink, automatically update it so that the page source matches the name in the cell?  Looking at the previous example, the text in cell B2 is a hyperlink named RIA0000 but due to this issue the hyperlink is going to an incorrect worksheet.  Can the macro look at cell B2, see that its named RIA0000 and then change the link source so that when clicked it will take the user to worksheet RIA0000?

Thanks!
Microsoft ExcelVB Script

Avatar of undefined
Last Comment
Escanaba

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Swapnil Nirmal

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Escanaba

ASKER
Perfect!
Thank you
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck