+ Reply to Thread
Results 1 to 8 of 8

Creating a hyperlink from within a form.

  1. #1
    Registered User
    Join Date
    12-18-2006
    Posts
    36

    Creating a hyperlink from within a form.

    What is the code to bring up the hyperlink form from within a form ?

    I would like to create the hyperlink while the user is using the data entry form


    Text box for NAME:[.............................] [hyperlink button] < places the address in URL box from the hyperlink form
    Text box for URL: [.............................]

    [submit button]


    So that once submitted, the NAME: appears as a hyperlink to URL: in the cell.

  2. #2
    Forum Contributor
    Join Date
    12-12-2005
    Posts
    667
    Place a WebBrowser control on your form. This is the basic code:
    Private Sub UserForm_Initialize()
    TextBox1.Text = "http://www.excelforum.com"
    WebBrowser1.Navigate TextBox1.Text
    End Sub
    Best regards,

    Ray

  3. #3
    Registered User
    Join Date
    12-18-2006
    Posts
    36
    Hey raypayette thanks for the reply.

    I my have asked the wrong question...

    When you right click in a cell and select "Hyperlink"
    it opens the "Insert Hyperlink" form.

    I wanted to have a button in my form to open that "Insert Hyperlink" form so that users can browse for the file location.

    text box ["MyDocument.pdf"]

    button [Hyperlink]
    text box ["C:/Windows/MyDocument.pdf"]


    Cell A1 = [MyDocument.pdf]

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning The_Vulcan

    How about :

    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  5. #5
    Registered User
    Join Date
    12-18-2006
    Posts
    36
    Hi DominicB


    Thanks for that, I have been looking for it everywhere.
    However now that I have it, I don't see it being able to work the way I wanted.

    Is there anyway to do what I wanted in a form ?

    Enter File Name
    [............................................]

    File location
    [............................................]
    [click to browse for file location]

    [submit]


    Where the file name appears as a link in the cell.

  6. #6
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi The_Vulcan

    Try downloading my add-in via the link below and using the hyperlink utility (Ultimate > Range > Hyperlink tools). Use the “Create quick hyperlinks” to select a range of, say, 10 blank destination cells (which will end up as hyperlinks), 10 cells containing hyperlink text, and 10 cells containing the url of the hyperlink. Click on OK and the 10 hyperlinks will be created.

    I think that this offers the functionality you require – try it and if you need this in your own macro and it works OK I can arrange to send you a file containing the userform and the code that drives the utility.

    HTH

    DominicB

  7. #7
    Registered User
    Join Date
    12-18-2006
    Posts
    36
    Hi DominicB

    I grabbed your excellent utility and cast a rating over at Vertex42.com.

    However the “Create quick hyperlinks” utility doesn't have the file browser button I am after.


    I have a form with say 20 text fields that is submitted to the sheet.
    A couple of those fields should be links to external .pdf's

    As it is I think they will have to use the form to enter the 20 items and submit.

    Then browse the sheet, and right click create hyper link on each item so that they can then browse for the file they want to link to.

    Thanks for your help.
    And I look forward to playing with your utility.

  8. #8
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi The_Vulcan

    I grabbed your excellent utility and cast a rating over at Vertex42.com.
    Thanks for that. Much appreciated.

    DominicB

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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