What's the point of the Call statement?
What's the point of the Call statement?
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: What's the point of the Call statement?

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    =ActiveCell.Address
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Quick query: Why bother with the Call Statement?

    If you want to run one macro from within another one I've seen code like:

    Sub test()
    'Do something, then
    Call test2
    End Sub

    or just

    Sub test()
    'Do something, then
    test2
    End Sub

    Why the Call statement. Does it add anything, or am I missing something?

    Rgds
    AJ

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    It's just syntax left over for backward
    compatibility with older versions of BASIC.
    You don't need it at all.


    Kind Regards,
    Ivan F Moala From the City of Sails

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You do need it if you're passing arguments to a procedure though, don't you, Ivan?

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Actually, ignore that, it's only if you use brackets around your arguements, sorry.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com