View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jezebel[_3_] Jezebel[_3_] is offline
external usenet poster
 
Posts: 45
Default Error Message in Loop

Offset() takes two arguments, and you're giving it only one.


"Joe Fish" wrote in message
oups.com...
Hi,
I'm trying to soup up a loop I have, but I'm getting the following
error message:

Wrong Number of Arguments or Invalid Property Assignment

I've been through Help and The Books, but I can't determine what's
wrong.

Thanks,
Joe

Sub MOO()

Dim rng As Range
Set rng = Range(ActiveCell, ActiveCell.End(xlDown))

j = 0

For Each cell In rng
If cell.Value < cell.Offset(-1).Value Then
CreatePSFrontLabel cell, j
j = j + 1
End If
Next

End Sub