+ Reply to Thread
Results 1 to 4 of 4

Problem with VBA Hyperlinks.Add taking Anchor from RefEdit in Userform

  1. #1
    Registered User
    Join Date
    11-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Problem with VBA Hyperlinks.Add taking Anchor from RefEdit in Userform

    Hello All,

    I was hoping to get some help with a problem I am having. I've googled forums and tinkered with the code for over a day now and still get errors in adding a hyperlink.

    I've tried to create a simple Userform that allows users who aren't that tech savvy to click on a hyperlink (or a button somewhere) and edit a hyperlink.
    The Userform has three different inputs:
    Address - which comes from Application.FileDialog(msoFileDialogFilePicker)
    TextToDialog - comes from manual textbox input
    Anchor - which comes from RefEdit control

    The problems arise around the Anchor (I'm assuming, since when I get various errors, the yellow arrow is on the line with "Anchor: RefEdit.Value"

    Any help with the problem would definitely help. Thank you in advance

    Below is my code:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by lepperga; 04-21-2014 at 05:02 PM. Reason: Forgot to add code tags

  2. #2
    Registered User
    Join Date
    11-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Problem with VBA Hyperlinks.Add taking Anchor from RefEdit in Userform

    Right now there is a Runtime error - 13: Type mismatch

    There is a solution that involves putting a Hyperlinks formula in the cell, but I would rather input the hyperlink itself, instead of a formula. I plan to export this Userform in another workbook, but I need it to work in the test workbook before I fiddle with the main workbook.

    Any help with this problem would be greatly appreciated! Thank you Excel Community!

  3. #3
    Registered User
    Join Date
    11-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Problem with VBA Hyperlinks.Add taking Anchor from RefEdit in Userform

    Hello Community,

    I am still looking for a solution to this problem I am having. I am getting angry because nothing I do seems to help. I proceeded with adding a =HYPERLINKS formula into the cell itself instead of adding a hyperlink. I came across problems later in which I need to reference the hyperlink, and not a formula (which is my only current solution). I'm hoping that another set of eyes on this might bring some clarity as I've been staring at this trying to figure out why it is not working.

    Sorry for the self-bump but I really need some input.

    Thank you

  4. #4
    Registered User
    Join Date
    11-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Problem with VBA Hyperlinks.Add taking Anchor from RefEdit in Userform

    After a lot of fiddling, I have finally found a solution to my problem. As it turns out, hyperlinks.add can be tempermental. I converted the output of the RefEdit control to R1C1 notation instead of A1 notation and that did the trick. Hopefully, this helps future users on their quest to solve their own riddles.

    Thanks

+ 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] Userform textbox used as refedit
    By Jacques Grobler in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 06-29-2012, 01:45 AM
  2. Using Loop Macros with RefEdit controll in userform
    By FRIEL in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-29-2010, 05:41 AM
  3. Userform Error with Blank RefEdit.
    By Baziwan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-05-2010, 01:50 AM
  4. RefEdit remove anchor
    By Curare in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2007, 08:44 PM
  5. Cant Seem To Deselct RefEdit Box On Userform
    By JR@SGC in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2007, 08:28 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