+ Reply to Thread
Results 1 to 3 of 3

Programming hyperlink into pulldown menu

Hybrid View

  1. #1
    Registered User
    Join Date
    11-01-2006
    Location
    Nottingham, UK
    Posts
    8

    Programming hyperlink into pulldown menu

    I wonder if anyone can help?

    Currently, I have code to program a pull-down menu ('File') to display 2 options ('About GROW' and 'Print') to run respective subs 'CallDocMenu' and 'ZPrintAll'. Both of these subs calls up a worksheet. However, I now need one of the options to be an external hyperlink.

    The code to program the 'File' pulldown is:

    MenuBars(xlWorksheet).Menus.Add "&File"
        MenuBars(xlWorksheet).Menus("File").MenuItems.Add "&About GROW", "CallDocMenu"
        MenuBars(xlWorksheet).Menus("File").MenuItems.Add "-"
        MenuBars(xlWorksheet).Menus("File").MenuItems.Add "&Print", "ZPrintAll"
    and sub 'CallDocMenu' has the following code:

    Sub CallDocMenu()
        Worksheets("DocMenu").Select
    End Sub
    So, instead of option 'About GROW' calling up sheet 'DocMenu', it needs to follow an external hyperlink eg http://www.gest.com/growdoc.pdf

    Can anyone help with this?

    Thanks in anticipation

    ..... Andre
    Last edited by VBA Noob; 08-27-2008 at 08:55 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,480
    Maybe you can make use of the FollowHyperlink method

    Direct from help file.
    ActiveWorkbook.FollowHyperlink Address:="http://example.microsoft.com", _
        NewWindow:=True
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    11-01-2006
    Location
    Nottingham, UK
    Posts
    8
    Quote Originally Posted by Andy Pope View Post
    Maybe you can make use of the FollowHyperlink method

    Direct from help file.
    ActiveWorkbook.FollowHyperlink Address:="http://example.microsoft.com", _
        NewWindow:=True
    This worked!

    I replaced my
     'Worksheets("DocMenu").Select'
    with your code.

    Thank you very much Andy

    ..... Andre
    Last edited by VBA Noob; 08-27-2008 at 01:25 PM.

+ 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. How to disable Hyperlink options in rightclick menu option
    By Anandi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2008, 05:24 AM
  2. Menu bar does not appear ONLY when workbbok activated via a menu sheet
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2008, 07:23 AM
  3. Hyperlink from drop-down menu
    By sergeantstrudle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2007, 04:16 AM
  4. [SOLVED] Menu Customization (Need Modular)
    By mpeplow in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2007, 05:14 PM
  5. Opening Excel With No Menus
    By graham80 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2007, 08:37 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