View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
excelnut1954 excelnut1954 is offline
external usenet poster
 
Posts: 175
Default If statement not working

On Nov 23, I got a respons on how to construct an IF statement to
redirect the flow of a macro. I was given the coding to solve the
problem. I wasn't able to continue with the project until today. I've
changed it a little from what I was given here because of the creation
of 2 new subs I wanted to include in the flow of control. But, I'm
having a problem with it.

The macro is suppose to check the range "Deleted_Today". If it is 0,
then I wanted to redirect to a sub named FormatCells. If there was a
number in there, then it would go to a sub named Move_Deleted_Records.

As always, I appreciate all the responses I've gotten here. However, I
get an error, and it highlights the 1st line. I've check to make sure
the spelling of the range name, and the 2 subs are correct. Can someone
help explain why this is hanging up?
Thanks,


If Range("Deleted_Today") = 0 Then
FormatCells
Else
Move_Deleted_Records
End If