Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually, you can offset with one argument. The part of the code that
gets highlighted in the error message is the macro (CreatePSFrontLabel ). |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nope. Both arguments of Offset() are optional.
I suspect you have the wrong number or type of arguments for your CreatePSFrontLabel procedure. In article , "Jezebel" wrote: Offset() takes two arguments, and you're giving it only one. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I get a Yes/No message box to loop | Excel Discussion (Misc queries) | |||
Error message when using the Solver in a VBA macro loop | Excel Programming | |||
changing the message in an error message | Excel Worksheet Functions | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming |