VBA error - runtime error 1004 RRS feed

  • Question

  • Hi, when I try to run a VBA macro I get this error message:

    runtime error 1004 microsoft excel cannot find any data to replace. check if your search formatting and criteria are defind correcctly.  if  you  sure  that  matching  data  exists in this workbook, it may be on a protected sheet. excel cannot replace data on a protected worksheet.

    The problem is that Macro run for several month, and everything was ok.

    I didn't change anything, not in the code, nor in the files protected definition. what could cause that?



    Wednesday, November 8, 2017 1:17 PM

All replies

  • You didn't post your VBA code that shows how you are searching, but I wonder if the "Match entire cell contents" option is enabled in Excel?

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Wednesday, November 8, 2017 2:16 PM
  • Hi Ypreis,

    Please provide your code and show worksheet (insert a screenshot).
    I can say nothing specific only by an error message.



    • Edited by Ashidacchi Thursday, November 9, 2017 1:59 AM
    Thursday, November 9, 2017 1:55 AM