+ Reply to Thread
Results 1 to 3 of 3

hyperlink to macro

  1. #1
    alok.bisani@gmail.com
    Guest

    hyperlink to macro

    Click on a hyperlink to execute a VBA macro. How to setup the Macro
    address and/or subadress fields for this? I remember seeing something
    for this a while back.


  2. #2
    Nick Hodge
    Guest

    Re: hyperlink to macro

    You could use the Worksheet_FollowHyperlink() event as below. This runs the
    Sun RunCode in a standard module. Obviously you can test the values provided
    by the Hyperlink object (Target) if you only want to react to certain
    hyperlinks, etc.

    Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
    RunCode
    End Sub

    --
    HTH
    Nick Hodge
    Microsoft MVP - Excel
    Southampton, England
    nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS

    <alok.bisani@gmail.com> wrote in message
    news:1115411486.112927.112750@o13g2000cwo.googlegroups.com...
    > Click on a hyperlink to execute a VBA macro. How to setup the Macro
    > address and/or subadress fields for this? I remember seeing something
    > for this a while back.
    >




  3. #3
    alok.bisani@gmail.com
    Guest

    Re: hyperlink to macro

    Yes this would work. For eg. setup hyperlink with target address as the
    hyperlink object range itself, and then intercept in follow event to
    interpret Target range to action some sub routine. But this would mean
    that everywhere you create hyperlink you will have to add its address
    in the Follow event handler to switch control to a required sub
    routine..

    I think there might have been another way which I have seen
    some time back. It was used to setup a hyperlink to run a macro in
    another workbook using some formatting in the address and or
    subadress(??). I have read recently that hyperlink to launch VBE code
    for named sub routine is available <a
    href="http://google.com/groups?as_umsgid=OD4%24vPeRCHA.1676@tkmsftngp12">
    here->http://google.com/groups?as_umsgid=O...76@tkmsftngp12
    </a>.

    Now was there anything to execute a macro instead of editing it?


+ 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