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: 9
Default Complie error: Wrong number of arguments or invalid property assi

I'm pretty new to this€¦

It's a 2 part question.

1) I have this procedure below that works fine with 2 columns. When I add
a third column, say column "AE" I get the compile error in the subject line
above, why? I wouldn't think it would matter the number of columns I
provide here.

Private Sub DeleteBlankRows()

Dim c As Range

For Each c In Range("P10:P" & intNumRows, "W10:W" & intNumRows)
If c.Value = "0" Or c.Value = Null Then
c.EntireRow.Delete xlUp
End If
Next c
End Sub

2) If I understand this procedure correctly, the way it sits right now, it
will only delete a row if it is zero or null for columns €œP€ AND €œW€
(*starting at row 10 and going to wherever the last row maybe). If not, that
is where I want this to go. Delete a row if it's zero or null for columns
P,W, Z, AE, AR, etc.

Does this make sense? Thanks in advance.

 
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
Compile Error: Wrong arguments or Invalid property Brent E Excel Discussion (Misc queries) 3 May 1st 07 07:11 PM
When Using Format(Now(), "yyyymmmddhhmm") get wrong number of arguments or invalid property assignment Error Connie Excel Programming 2 November 8th 06 08:30 AM
Wrong number of arguments or invalid property assignment [email protected] Excel Programming 1 June 27th 06 04:42 PM
Wrong Number of Arguments or Invalid Property Assignment??? tbassngal Excel Programming 3 January 11th 06 04:01 PM
Wrong number of Arguments or Invalid property assignment Turin[_2_] Excel Programming 1 July 17th 05 09:52 PM


All times are GMT +1. The time now is 02:05 PM.

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"