'Excel VBA - Compile Error - Expected Function or variable

The following Sub procedure was working fine, but has suddenly started throwing an error.

Sub DeleteAll()

Cells.Select
Selection.Delete Shift:=xlUp
Cells.Select

End Sub

Error enter image description here

What could be the reason for the error?



Solution 1:[1]

Not sure if I am supposed to answer my own question, doing it anyway: Thanks to trincot's comment I believe I have understood now, I think this is what happens:

return 5 x                  # not returning anything here, instead calling itself again
    (return 4 x             # not returning anything here, instead calling itself again
        (return 3 x         # not returning anything here, instead calling itself again
            (return 2 x     # not returning anything here, instead calling itself again
                (return 1)  # returning 1 (no more recursive action from now on)
            )               # returning 1 x 2 = 2
        )                   # returning 2 x 3 = 6
    )                       # returning 6 x 4 = 24

# 'finally' returning 5 x 24 = 120

=> 120

Hope the above is understandable. Thanks again.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1