+ Reply to Thread
Results 1 to 2 of 2

VBA - Open New I/E or New Tab

  1. #1
    Forum Contributor
    Join Date
    08-14-2016
    Location
    Warrington, England
    MS-Off Ver
    MS 365
    Posts
    174

    VBA - Open New I/E or New Tab

    Hi all,

    I have a simple macro which is to follow a hyper link:

    Private Sub Btn_Click()
    ThisWorkbook.FollowHyperlink "http://mylink"
    End Sub

    This works however sometimes i get an error message: Run-time error '-2147023706 (800704a6) Method 'FollowHyperlink' of object '_workbook' failed.

    This only appears some times and I am not 100% sure but when trying to recreate it I believe it occurs when switching between an open I/E or Chrome instance. So I need a code that will open a new instance of I/E if one is not already open, if one is already open then it will just open the link in a new tab.

    Can anyone assist?

    Thanks in advance
    Excel Beginner

  2. #2
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421

    Re: VBA - Open New I/E or New Tab

    Please Login or Register  to view this content.
    Last edited by GuruWannaB; 12-11-2018 at 01:50 AM. Reason: forgot the END SUB andupdated with IE option
    I help because of the Pavlovian dog that resides in the inner me...so if you are happy with the results, please add to my reputation. It helps keep me motivated!



    Please mark your threads as Solved once it is solved. Check the FAQ's to see how.

+ 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. [SOLVED] vba to open excel workbook if alrady open by other user show userform and exit sub
    By bluepomme in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-06-2018, 07:14 PM
  2. Replies: 4
    Last Post: 11-25-2017, 04:09 PM
  3. [SOLVED] Test for file open from Command Button on userform - not displaying open already message
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2017, 09:45 AM
  4. Replies: 8
    Last Post: 11-25-2015, 08:14 PM
  5. Open Workbook if closed, keep open if open, insert password
    By jwahl16 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-09-2013, 04:09 PM
  6. Replies: 14
    Last Post: 08-17-2012, 10:54 AM
  7. Replies: 0
    Last Post: 12-30-2005, 04:35 AM

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