Results 1 to 4 of 4

Run-time error '1004' ; Delete method of Range Class failed

Threaded View

Adam1987 Run-time error '1004' ;... 08-14-2012, 06:08 AM
romperstomper Re: Run-time error '1004' ;... 08-14-2012, 06:36 AM
Adam1987 Re: Run-time error '1004' ;... 08-14-2012, 06:42 AM
romperstomper Re: Run-time error '1004' ;... 08-14-2012, 06:43 AM
  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Run-time error '1004' ; Delete method of Range Class failed

    Good Morning All,

    Having probelms with the below macro;

    For a = 500 To 1 Step -1
    If Rows(a).Hidden = True Then Rows(a).Delete
    Next
    End Sub
    Im trying to delete the hidden rows in the attached workbook. I think the problem is when defining the number of rows in the work book. It is currently using 500, is there a way to make this search all rows with data, as at times the workbook could cotain more or less than 500 hundred rows?

    When i run the current macro i get - Run-time error '1004' ; Delete method of Range Class failed

    Thanks in advance iof any help you might be able to offer.
    Attached Files Attached Files
    Last edited by arlu1201; 08-14-2012 at 07:23 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