0

Is there a way to change the text to display of all the hyperlinks in a sheet?

All I want to do it is run a macro to trim the the existing TEXT to Display to 5 chrs only? At the mo, my text to display is really big text string something like "21253.bla bla bla.wla wla wla. dah dah dah.jpg" and I only want to display 21253

Is this even possible? Regards Shei

1 Answer 1

1

Loop through the links on the sheets and use the left function to trim the text to display. Example below

Dim hl As Hyperlink
For Each hl In ActiveSheet.Hyperlinks
    hl.TextToDisplay = Left(hl.TextToDisplay, 5)
Next
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.