View Full Version : Getting Application defined error 1004 for vba

09-30-2012, 02:04 PM
Hi All

I used the code which is mentioned on
article 151 for Combine All Worksheets into one

while combining worksheets it is giving me Run Time Error 1004: Application defined or object defined error on line:

trg.Cells(65536, 1).End(xlUp).Offset(1).Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.value

Please help me out. Thanks in advance.

09-30-2012, 11:22 PM
Hi Sonia123,

You should have posted in the "excel" forum rather than "testing" to get this post noticed but apart from that this error's quite well known but there are a couple of different reasons for it. Have a look at the following links http://support.microsoft.com/kb/210684 and http://support.microsoft.com/kb/818808 to see if you can isolate the reason and if either of the workarounds can help you.