Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open Web Page via Add-In (Excel 2003)

    Hi all, and thanks for you time.

    I have been asked to add a bit of functionality to an existing Excel xla, and I’m wondering about the best way to do it.

    It’s a sub-menu to be added to an existing menu, displaying a list of intranet help pages. Selecting a page from the list should open it in the browser.

    I haven't used VBA to open a web page before - Googling got me:
    Activeworkbook.FollowHyperlink address, NewWindow:= false
    which worked fine initially, but I had to allow for the possibility of no active workbook.

    With some trepidation I changed it to
    ThisWorkbook.FollowHyperlink ...
    So the parent would be the xla workbook, and running it crashed Excel every time.

    Following a hyperlink entered in a cell on a worksheet in the xla likewise crashes me.

    Any help would be greatly appreciated.

    Thanks,

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Open Web Page via Add-In (Excel 2003)

    Welcome to Woody's Lounge!

    Using ThisWorkbook.FollowHyperlink should work from an add-in, even if no workbook is open. See the add-in in the attached zip file.
    Attached Files Attached Files

  3. #3
    New Lounger
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Web Page via Add-In (Excel 2003)

    Thanks very much, Hans. This works perfectly, and the test I tried that crashed it yesterday now works as well. Perhaps I was just in need of a reboot at the time. Would no doubt have wasted a lot of time without your help.
    Best,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •