+ Reply to Thread
Results 1 to 6 of 6

Run-Time Type 13 Mismatch Error help - Excel VBA

  1. #1
    Forum Contributor
    Join Date
    08-07-2014
    Location
    London
    MS-Off Ver
    10
    Posts
    148

    Run-Time Type 13 Mismatch Error help - Excel VBA

    Hi all,

    Some help would be much appreciated. I'm getting a type mismatch error on the below code and I was wondering if anyone could see why I am getting it. I can't seem to see an error myself - I've highlighted the error point.

    Please Login or Register  to view this content.
    A bit background on what I am trying to do - The above transfers data from Word to Excel. However, it deletes the Enclosed Bookmark on Word, which I need to keep, so I've added coding to replace the bookmark. That's where the problems have started.

    Any help would be much appreciated.

    Thanks,

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Run-Time Type 13 Mismatch Error help - Excel VBA

    Change the declaration of BMRange to Object.
    If posting code please use code tags, see here.

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Run-Time Type 13 Mismatch Error help - Excel VBA

    Try changing:
    Please Login or Register  to view this content.
    To:
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    08-07-2014
    Location
    London
    MS-Off Ver
    10
    Posts
    148

    Re: Run-Time Type 13 Mismatch Error help - Excel VBA

    Thank you both. That's worked a treat. On a side note, can I ask why it needed to be Object rather than range?

  5. #5
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Run-Time Type 13 Mismatch Error help - Excel VBA

    Because since you are running this in Excel, a Range is an Excel Range, you can't assign a word range to an excel range, they're completely different things

  6. #6
    Forum Contributor
    Join Date
    08-07-2014
    Location
    London
    MS-Off Ver
    10
    Posts
    148

    Re: Run-Time Type 13 Mismatch Error help - Excel VBA

    Cheers for that. I'll pocket that away for future reference.

+ 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. Run-Time Error 13 - Type Mismatch when closing excel
    By morbdetro in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2014, 01:53 PM
  2. Excel VBA Run-time error '13' Type mismatch
    By svibuk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-01-2014, 04:23 AM
  3. Excel VBA Run-time error '13' Type mismatch
    By pankajpm in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-27-2013, 05:34 AM
  4. [SOLVED] Excel VBA Run-time error '13' Type mismatch
    By mackypogi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2013, 02:15 AM
  5. Excel VBA Run-time error '13' Type mismatch
    By edgaryp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2013, 06:48 PM
  6. run-time error 13: type mismatch in VBA (Excel 2007)
    By zeno1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2012, 04:38 PM
  7. run time error(13) type mismatch in Excel Feed
    By lorneg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2006, 05:40 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