none
Excel 2010 VBA: Paste special no problem in codes but the macro stop before each paste in the script. RRS feed

  • Question

  • Paste special no problem in codes but the macro stop before each paste in the script.

    The same code worked fine before September.

    Today I found that if I open Excel before Word and Outlook, the macro doesn't stop.

    In inverse, if I open Outlook or Word first, the Excel macro stops before paste.

    However it seems that it is not an error because if I click on the step by step bar to continue, the script continues without problem until it find another pastespecial etc.

    Excel, Word and outlook come from the same Office package.

    Thanks for your help.

    Best regards

    Patrice Brel

    Wednesday, October 11, 2017 1:48 PM

All replies

  • Hi,

    Please provide your code.

    Regards,

    Ashidacchi

    Thursday, October 12, 2017 12:41 AM
  • Hello,

    Maybey the problem occurs because excel is not the active application.

    how did you address your objects?

    try to address the with the full path, eg. thisworkbook.worksheets(1).cells(1,1), not simply cells(1,1)

    Best regards,

    Wouter

    Thursday, October 12, 2017 1:14 PM
  • Sorry for the delay. I'm continuing to explore my problem.

    I also noted that by opening Excel before Word, Outlook or PowerPoint, my macros work very fast.

    I tried activeworkbooks, activesheet... Getobject ("Excel...). Opening Excel first is my current solution but that's not an answer. I would like to understand.

    Regards

    Patrice

    Monday, October 23, 2017 7:15 PM
  • Please provide your macro (VBA code).

    Ashidacchi

    Monday, October 23, 2017 8:20 PM