+ Reply to Thread
Results 1 to 7 of 7

run-time error 4605 when using a macros in excel 2010 (windows 7)

  1. #1
    Registered User
    Join Date
    01-25-2010
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010 and Excel 2007 (Windows 7 and XP mode)
    Posts
    9

    run-time error 4605 when using a macros in excel 2010 (windows 7)

    The following macros (which was created with the help of this forum-thanks) is used to transfer data from excel to several tables within a word document:

    Please Login or Register  to view this content.
    I recieve a an error message saying:

    "run-time error 4605

    This method or property is not available because the clipboard is empty or not available"

    Stepping into debugger it stops here: "wdApp.Selection.Paste"

    This code works fine in both excel 2007 and 2010 in XP mode, but is much slower. It seems to only fail in windows 7? It also seems to fail at different points, cutting and pasting into some of the tables then failing.

    Please could you help me determine what is wrong.

    Much appreciated,

    rpt21

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: run-time error 4605 when using a macros in excel 2010 (windows 7)

    Hi rpt21,

    I first believe the error message. Lets go with the clipboard is empty. That would mean that what you thought you copied wasn't there. Looking at the code it refers to a Table(T) and I assume T is a number. If you were refering to table 5 or Table(5) and there was no table 5 in the workbook or document you could easily get this message.

    When it stops next time and you go into the debugger, hover you mouse over the T in Table(T) to see what value it is. Then go to where it is supposed to be pulling the copy from and see if there is really one of those there.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    01-25-2010
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010 and Excel 2007 (Windows 7 and XP mode)
    Posts
    9

    Re: run-time error 4605 when using a macros in excel 2010 (windows 7)

    Hello MarvinP,

    There is definitely a table where is should paste, the document is made up identical pages and each page has five tables in it. The data is pasted into every 5th table since the other tables contain other content.

    The macros fails at different points, so it is not one table that is problematic.

    This code has worked for a while, it is only since I have upgraded to Windows 7. As I mentioned, it works on my virtual XP but it is annoying to use this each time I need to run this macros.

    regards,

    Ross

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: run-time error 4605 when using a macros in excel 2010 (windows 7)

    Hi rpt21,

    Because it fails at different times and places, I'm thinking some well placed Application.DoEvents might solve the problem.

    Search for VBA DoEvents or look at
    http://en.allexperts.com/q/Visual-Ba...s-Function.htm

  5. #5
    Registered User
    Join Date
    05-04-2012
    Location
    Zurich
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: run-time error 4605 when using a macros in excel 2010 (windows 7)

    It's been a while, so you may have solved this already, but in case anyone else has a similar problem:

    I started getting this error when I upgraded from MS Office 2003 to 2010, but the macro still worked perfectly well in 2003.

    The tables were there, but I noticed that sometimes the copying didn't work. As this didn't ever happen in debug mode, I added 5 secs waiting time right before the copying.

    This makes the macro slower, but as it takes a few minutes to run anyway, I didn't mind.

    Please Login or Register  to view this content.
    Last edited by Imardin; 05-04-2012 at 12:16 PM.

  6. #6
    Registered User
    Join Date
    04-28-2014
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: run-time error 4605 when using a macros in excel 2010 (windows 7)

    Hey !


    Thanks you for the previous solutions!
    Last edited by junino78; 01-26-2015 at 01:00 PM.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: run-time error 4605 when using a macros in excel 2010 (windows 7)

    junino78 welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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