+ Reply to Thread
Results 1 to 5 of 5

Macro that inserts rows stopped working

  1. #1
    Forum Contributor
    Join Date
    08-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    163

    Macro that inserts rows stopped working

    I was using this macro below and it was working fine and it just stopped working and give me this error

    Run-time error '1004'

    Insert method of range class failed

    this is the code

    Please Login or Register  to view this content.
    any ideas??

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Macro that inserts rows stopped working

    if possible can u please attached sample workbook, its make very easy to validate and resolve your query
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Macro that inserts rows stopped working

    Well the coding seems Ok and the fact it did run before without problem i would sugest you have a look at what you copy to what location.
    if your working with ranges specified this way then the fact that your origin or destiantion contain some merged cells it can fail because some cells does not exist anymore. (if you merge A1 and B1 it becomes A1 and there is no longer a B1 in your sheet. )
    If solved remember to mark Thread as solved , to mark your thread as Solved select Thread Tools and click Mark thread as Solved.

    I can't read the mind of my wife so then I get picture but no sound .... and then I mostly get the idea, same goes here picture your outcome and I get the idea.

  4. #4
    Forum Contributor
    Join Date
    08-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: Macro that inserts rows stopped working

    okay i figured out that when the sheet is unprotected it works but when i protect it it doesnt work. I have unlocked all the cells and it still throughs the error.

    does anyone know why it would do this

    i need the sheet protected bc it will be used by others and there are parts i need the cells locked, but all the cells in reference with this code are unlocked
    Last edited by jed38; 08-16-2013 at 09:44 AM. Reason: more info

  5. #5
    Forum Contributor
    Join Date
    08-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: Macro that inserts rows stopped working

    My work around is to just have the macro unprotect it at the beginning of the code and protect at the end.

    Please Login or Register  to view this content.

+ 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. Web Scrapping Macro stopped working
    By Tejas.T in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2013, 04:00 PM
  2. Macro Stopped Working
    By andybason in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-11-2012, 01:20 PM
  3. Macro stopped working.
    By joleen in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-06-2011, 05:37 AM
  4. Excel 2007 : Macro stopped working
    By jaw0001 in forum Excel General
    Replies: 5
    Last Post: 10-13-2010, 07:59 AM
  5. Excel 2007 : Macro Code Stopped Working
    By stevo_300 in forum Excel General
    Replies: 5
    Last Post: 04-06-2010, 07:57 AM

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