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
any ideas??Please Login or Register to view this content.
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
any ideas??Please Login or Register to view this content.
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.
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.
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
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks