Results 1 to 6 of 6

Worksheet.Range(Cells(r,c),Cells(r,c)) & error 1004

Threaded View

onebir Worksheet.Range(Cells(r,c),Cel... 03-27-2007, 08:24 AM
Simon Lloyd it's normally used in this... 03-27-2007, 08:34 AM
mudraker If you do not use a command... 03-27-2007, 09:29 AM
onebir Thanks very much for the... 03-27-2007, 11:46 AM
mudraker If OutputSheet is the active... 03-27-2007, 07:47 PM
onebir Thanks - that's good to know. 03-28-2007, 05:10 AM
  1. #1
    Registered User
    Join Date
    03-27-2007
    Posts
    3

    Worksheet.Range(Cells(r,c),Cells(r,c)) & error 1004

    I'd like to access a range using this syntax, but it never works!
    Here's (the edited hightlights of) my code:

    Sub Test()
      Set TestSheet = Worksheets("A")
      Set OutputSheet = Worksheets("B")
      For i = 1 To 10
        TestSheet.Range(Cells(i, 1), Cells(i, 6)).Copy
        OutputSheet.Cells(i, 1).Paste
      Next i
    End Sub
    When it gets to the bold line, the dreaded incomprehensible error 1004 strikes. It's very frustrating to be thwarted doing something so apparently simple... If anyone can explain what I'm doing wrong, I'll be very grateful!
    Last edited by onebir; 03-27-2007 at 08:29 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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