Ask Your Question
0

can a macro call itself [closed]

asked 2014-03-10 15:05:15 +0200

mbspringer gravatar image

macros are usually reentrant, how do I call a macro programatically?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-20 07:08:57.460154

2 Answers

Sort by » oldest newest most voted
0

answered 2014-03-11 02:16:36 +0200

kumiponi gravatar image

Here's an example function that calls itself – it's recursive.

Function factorial (n As Integer) As Double
    If n < 0 Then
        Print "Error!"
        Stop
    ElseIf n < 2 Then
        factorial = 1
    Else
        factorial = n * factorial(n - 1)
    End If
End Function
edit flag offensive delete link more
0

answered 2014-03-10 15:07:27 +0200

mbspringer gravatar image
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-03-10 15:05:15 +0200

Seen: 168 times

Last updated: Mar 11 '14