Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Hyperlink stops working when the Worksheet name is changed

0

I saw a similar issue in the link(https://www.excelkey.com/forum/viewtopic.php?f=2&t=139#). Tried the code and it does not seem to work.

Note: The above post is from Excelkey.com which is TeachExcel now ! Since, they have moved to the new portal, posting this Question here.

I have attached my Excelsheet(Macro-enabled) here. The aforementioned code is added to the "ThisWorkbook" Module.

Basically, I have a table in the sheet called "Mock". This sheet with filled with Buttons that are hyperlinked to different destinations within the sheet. Now when I try changing the name of the worksheet to WK27, the hyperlinks stop working. I have tried the code in the above post, but it doesn't seem to work. Basically, What I need is given below.

1. I should be able to change the Worksheet name and the Hyperlinks should not be impacted.

2. I should be able to duplicate the worksheet(with newer names everytime)and the hyperlinks should bot be impacted.

Do help in this

-KK

Answer
Discuss

Discussion

KK

We can't really answer you unless you attach an Excel file (with the code) to your original question but wouldn't you be better asking your question in the forum you got the code from?

Also, please edit your question title so it's not all in uppercase (it's like you're shouting!)
John_Ru (rep: 6152) Jun 30, '21 at 7:31 am
John, I have made the changes. Hope this helps.

-KK
KrishKathir18 (rep: 2) Jun 30, '21 at 7:43 am
Add to Discussion

Answers

0

Used a Defined name Range(under Name Manager) to fix this issue.

Discuss

Discussion

Good work Kk. BTW I haven't tested butĀ  think that macro doesn't work for you since it doesn't look for hyperlinks in the Shapes you've use to move to hyperlink locationsĀ 
John_Ru (rep: 6152) Jun 30, '21 at 10:58 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login