+ Reply to Thread
Results 1 to 5 of 5

Why is adding hyperlinks using VBA failing?

  1. #1
    Registered User
    Join Date
    04-05-2017
    Location
    Fortaleza
    MS-Off Ver
    2013
    Posts
    4

    Why is adding hyperlinks using VBA failing?

    Hello,

    Could you assist me in finding where the flaw is?

    It's giving me a RunTime error 1004:

    Please Login or Register  to view this content.
    Basically, I want to set the links in Column A. The address is column G and the TestToDisplay is in col B.

    Thank you!

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Why is adding hyperlinks using VBA failing?

    That's quite a complex way to approach a simple macro. You don't need to retrieve all the cell values into a Variant. You're also using the wrong dimension of the array - UBound(va, 2) will return the number of columns, not rows. How about simplifying like this:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    04-05-2017
    Location
    Fortaleza
    MS-Off Ver
    2013
    Posts
    4

    Re: Why is adding hyperlinks using VBA failing?

    Thanks, but this is giving a runtime error. See the attached file. I've run into this issue in different ways I've tried approaching it.
    It won't let me add a link to shared file, nor does it let me upload a file. The dropdown for managing attachment is blank.

    Appreciate it!
    Last edited by asantos80; 11-30-2021 at 06:54 PM.

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Why is adding hyperlinks using VBA failing?

    No attachment ...

  5. #5
    Registered User
    Join Date
    04-05-2017
    Location
    Fortaleza
    MS-Off Ver
    2013
    Posts
    4

    Re: Why is adding hyperlinks using VBA failing?

    2 problems found:
    01 - The URL's contain "#";
    02 - They contain over 4,000 characters, while hyperlinks allow up to 255

    I'm proposing we migrate to Google Sheets where these limitations don't apply.

    Thank you very for your great help!

+ 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. [SOLVED] Range.Hyperlinks.Count failing
    By omahaNative_1023 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-13-2021, 08:53 AM
  2. adding a date to cell a1 worksheet on open failing?
    By techexpressinc2 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-01-2011, 03:03 PM
  3. Adding cells to a named range failing
    By laterdaysluke in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2010, 03:13 AM
  4. failing hyperlinks
    By larscw in forum Excel General
    Replies: 1
    Last Post: 10-14-2009, 10:26 AM
  5. Hyperlinks failing to open
    By dmilosky in forum Excel General
    Replies: 0
    Last Post: 07-02-2009, 11:59 AM
  6. Excel 2007 : Hyperlinks failing
    By Rick_Stanich in forum Excel General
    Replies: 0
    Last Post: 10-24-2008, 10:42 AM
  7. [SOLVED] adding hyperlinks
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2005, 11:06 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