LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 1004 Error with Range/Array


Is there anything wrong with this code?

Private Sub CopyData()
Dim vArr As Variant, RR As Range
Dim SrcRng As Range, DestRng As Range
Dim Kiln As String
Dim X As Integer, Response As Variant, Style As Variant

' Get Header data
Set SrcRng = Worksheets("DataIn").Range("A3").CurrentRegion
vArr = SrcRng.Value
Worksheets("Report Log").Select
Set DestRng = Range("Source")
Set RR = Range("Source").Offset(DestRng.Rows.Count,
0).Resize(SrcRng.Rows.Count, 19)
RR.Value = vArr
<snip

End Sub


On one particular occasion I had 37 rows of data to copy, and only 34
were copied (plus the error generated below). I've tried this code
numerous times with similar results.

Run-time error '1004'
Application-defined or object-defined error.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 1004 when setting a Series Collection.Values as Array via VB David Messenger Excel Programming 6 July 8th 07 10:59 AM
Error '1004' - the specified value is out of range. Chris Excel Programming 13 September 20th 06 11:04 AM
Error 1004 using array in Sheet select. Trefor Excel Discussion (Misc queries) 4 September 7th 05 07:29 PM
setting range().hidden=True causes range error 1004 STEVE BELL Excel Programming 6 September 2nd 05 02:16 AM
Range Question / error 1004: method Range of object Worksheet has failed Paul Excel Programming 3 April 7th 05 02:56 PM


All times are GMT +1. The time now is 06:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"