Results 1 to 13 of 13

Runtime error 1004 Method 'Range' of object_ Global Failed

Threaded View

stevoDE Runtime error 1004 Method... 06-29-2017, 11:40 AM
Special-K Re: Runtime error 1004 Method... 06-29-2017, 11:43 AM
xladept Re: Runtime error 1004 Method... 06-29-2017, 11:46 AM
stevoDE Re: Runtime error 1004 Method... 06-29-2017, 11:53 AM
Special-K Re: Runtime error 1004 Method... 06-29-2017, 11:46 AM
xlnitwit Re: Runtime error 1004 Method... 06-29-2017, 11:46 AM
xladept Re: Runtime error 1004 Method... 06-29-2017, 11:59 AM
stevoDE Re: Runtime error 1004 Method... 06-29-2017, 12:21 PM
xladept Re: Runtime error 1004 Method... 06-29-2017, 11:51 AM
xladept Re: Runtime error 1004 Method... 06-29-2017, 12:37 PM
stevoDE Re: Runtime error 1004 Method... 06-30-2017, 04:41 AM
stevoDE Re: Runtime error 1004 Method... 06-30-2017, 06:22 AM
xladept Re: Runtime error 1004 Method... 06-30-2017, 11:33 AM
  1. #1
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2010
    Posts
    110

    Runtime error 1004 Method 'Range' of object_ Global Failed

    Can someone please tell me why this code is failing?

    Sub test()
    
    Dim LastRow As Long
    Dim rng As Range
    Dim i As Long
    
    LastRow = Cells(Rows.Count, "B").End(xlUp).Offset(-2, 0).Row
    
    Set rng = Range("B8:B" & LastRow).Resize(, 7)
     
         With rng
                For i = 1 To .Rows.Count
                    If .Cells(i, 7).Value <> "" Then
                        Range(i, 7).Resize(0, -7).Copy
                    End If
                Next i
           End With
    End Sub
    *edit* I = 1 to .rows.count and not 8
    Last edited by stevoDE; 06-29-2017 at 11:48 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. runtime error 1004 range of object global failed excel 2010
    By kwesmc1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2014, 05:22 PM
  2. [SOLVED] Runtime Error '1004' Method 'Range' of object '_Worksheet' failed
    By ovalstar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2013, 02:15 PM
  3. [SOLVED] Runtime error 1004: Method 'Range' of object '_Worksheet' failed
    By Phil Payne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2013, 01:30 AM
  4. Method 'Range' of object_ 'Global' Failed
    By naveenmarapaka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2012, 10:35 AM
  5. Run-time error '1004': Method 'Range' of object 'Global' failed
    By djwestholm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2012, 04:52 PM
  6. Run-time error '1004': Method 'Range' of object '_ Global' failed
    By mdvc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-20-2011, 11:48 AM
  7. 1004:runtime error method 'range' of object'_Global failed
    By trksbc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-21-2009, 03:25 AM
  8. runtime error 1004 method range of object global failed
    By dreamz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2006, 03:25 PM

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