+ Reply to Thread
Results 1 to 7 of 7

Hyperlink - Text Box to Macro

  1. #1
    Registered User
    Join Date
    11-23-2005
    Posts
    61

    Hyperlink - Text Box to Macro

    How do I hyperlink a text box ( button ) to an existing macro?
    Last edited by Cecil; 01-23-2009 at 09:13 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi

    If I understand the Q, just right click, pick the Assign Macro and pick the relevant macro.

    HTH

  3. #3
    Registered User
    Join Date
    11-23-2005
    Posts
    61
    See small Excel workbook attached.

    First text box not hyperlinked.

    Second text box is hyperlinked … to an underlying VB module.

    If you right-click the second text box, you can Assign Macro ( or VB module ).

    If you right-click the first text box, you cannot Assign Macro.

    ( chicken and an egg ) Question > How did that second text box get hyperlinked? ( this exhibit was dragged in from an already-made workbook )

    What am I missing here?

    Thanks.
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Cecil,

    Checking the macro that is called by the TextBox shows it is in your VBA project. What do you want to do or know?

    Sincerely,
    Leith Ross

  5. #5
    Registered User
    Join Date
    11-23-2005
    Posts
    61
    RE > Attachment.

    I setup the first text box ( green ) to show that I cannot assign it to a VB module by right clicking.

    I "dragged in" the second text box ( brown ) from another workbook. It is hyperlinked … to an underlying VB module.

    At the risk of embarrassing myself, the question is > How did that second text box get hyperlinked?

    Thanks.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Cecil,

    In your case, I don't know. I use a trick to create text boxes on worksheets from members who submit workbooks. The text box contains a hyperlink to the Excel Forum post.

    1. Here is what I do. Select the URL in the address bar and copy it with CTRL+C.
    2. Display the Drawing tool bar on Excel.
    3. Click the Rectangle
    4. Paste the URL with CTRL+V
    5. A TextBox is created with the hyperlink to the post.

    A hyperlink can be assigned to any Shape object using VBA code.

    Sincerely,
    Leith Ross

  7. #7
    Registered User
    Join Date
    11-23-2005
    Posts
    61
    Yes, that is good.
    Thanks Leith.
    I marked the "ticket" SOLVED.
    Cecil.

+ 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