+ Reply to Thread
Results 1 to 9 of 9

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

Hybrid View

beacska Run-time error 1004 -... 10-28-2008, 08:11 PM
shg Welcome to the forum. What... 10-28-2008, 08:34 PM
shg Gotta go. Try this: Sub... 10-28-2008, 08:44 PM
beacska This is working perfect. :-)... 10-29-2008, 04:45 AM
shg I've edited your post to add... 10-29-2008, 09:13 AM
shg What have you done to debug?... 10-29-2008, 09:30 AM
beacska I find out... it was a stupid... 10-29-2008, 04:44 PM
shg You're welcome. My... 10-29-2008, 04:56 PM
Tirren This typically means that... 10-29-2008, 04:59 PM
  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Welcome to the forum.

    What line generates the error?
    Entia non sunt multiplicanda sine necessitate

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Gotta go. Try this:
    Sub FormatTable()
        Dim cell    As Range
    
        For Each cell In Sheets("Sheet1").Range("A2", Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp))
            If IsEmpty(cell.Value) And _
               IsEmpty(cell.Offset(1, 0).Value) And _
               IsEmpty(cell.Offset(2, 0).Value) And _
               IsEmpty(cell.Offset(3, 0).Value) Then
                Range("A1:H2").Copy Destination:=cell.Offset(1)
                cell.Offset(-1, 0).Font.Bold = True
                With cell.Offset(5, 0).CurrentRegion.Borders
                    .LineStyle = xlContinuous
                    .Weight = xlThin
                    .ColorIndex = xlAutomatic
                End With
            End If
        Next cell
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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