+ Reply to Thread
Results 1 to 2 of 2

Type mismatch error under For x=1 To UBound(ExternalLinks)

  1. #1
    Registered User
    Join Date
    03-19-2013
    Location
    Kathmandu, Nepal
    MS-Off Ver
    Excel 2007
    Posts
    1

    Type mismatch error under For x=1 To UBound(ExternalLinks)

    Sub BreakExternalLinks()
    'PURPOSE: Breaks all external links that would show up in Excel's "Edit Links" Dialog Box

    Dim ExternalLinks As Variant
    Dim wb As Workbook
    Dim x As Long

    Set wb = ActiveWorkbook

    'Create an Array of all External Links stored in Workbook
    ExternalLinks = wb.LinkSources(Type:=xlLinkTypeExcelLinks)

    'Loop Through each External Link in ActiveWorkbook and Break it
    For x = 1 To UBound(ExternalLinks)
    wb.BreakLink Name:=ExternalLinks(x), Type:=xlLinkTypeExcelLinks
    Next x

    End Sub

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: Type mismatch error under For x=1 To UBound(ExternalLinks)

    You would get that error if the active workbook doesn't have any external links.
    Everyone who confuses correlation and causation ends up dead.

+ 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] type mismatch if LBOUND and UBOUND are 1
    By RIZVI in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-08-2020, 02:48 PM
  2. [SOLVED] RunTime Error 13 ( type mismatch ) error is comming TextboxAfter_Update
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2017, 03:55 AM
  3. [SOLVED] Type-Mismatch on UBOUND(Array)
    By codeslizer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-17-2013, 06:03 AM
  4. Run Type error 13 Type Mismatch
    By Affan Khan in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-13-2012, 12:58 PM
  5. Complile Error: Type Mismatch ??? After adding error trap
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2012, 03:50 PM
  6. Conditional Formatting - Run Time Error '13' Type Mismatch Error
    By ksp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-17-2011, 07:37 PM
  7. Help: Compile error: type mismatch: array or user defined type expected
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2005, 05:05 PM

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