Error Message in Loop

  • Thread starter Thread starter Joe Fish
  • Start date Start date
J

Joe Fish

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
 
Actually, you can offset with one argument. The part of the code that
gets highlighted in the error message is the macro (CreatePSFrontLabel
).
 
Nope. Both arguments of Offset() are optional.

I suspect you have the wrong number or type of arguments for your
CreatePSFrontLabel procedure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top