+ Reply to Thread
Results 1 to 2 of 2

Why is this not an OLE object?

  1. #1
    Registered User
    Join Date
    03-16-2015
    Location
    Aarhus, Denmark
    MS-Off Ver
    2003,2010,2013
    Posts
    1

    Question Why is this not an OLE object?

    Can anyone explain to me how I fix this problem? I've asked the question before, but noone seems to understand the error. :/

    My sub runs great in excel 2003, but in 2010 i get this error.

    Can someone explain to me why vba doesn't recognize this as an OLE object?

    What scaleheight is supposed to do, is making sure, that ALL the text copied into the word object is visible - which isn't the case if I set scaleheight to 1, but msoFalse.


    You should be able to copy paste the code into a new sub.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Why is this not an OLE object?

    The code below works for me in Excel 2007.

    I needed to add a reference to Microsoft Word 12.0 Object Library. I suspect you have a reference to the 2003 Object Library which may show as MISSING and you need to untick it and add a reference to the 2010 Object Library.

    Note that you should also make a habit of defining (using Dim) your variables. You use a variable I ("wsFactark.Cells(I + 4, 13).Copy") and it is not clear to me where that variable is initialised (and it will therefore be blank or zero)

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Find in VBA finds first instance of similar object being searched but not exact object
    By xcelnovice101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2015, 01:10 PM
  2. Replies: 0
    Last Post: 06-19-2014, 02:09 PM
  3. Replies: 12
    Last Post: 06-20-2012, 01:53 PM
  4. Replies: 3
    Last Post: 10-25-2011, 02:12 PM
  5. buggy macro 'intersect' of object of object'_global failed" when deleting rows
    By Kezwick in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-18-2011, 07:11 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