Results 1 to 9 of 9

Thread: Solved: Check if function has been called as sub

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,446
    Location
    Again, I have to ask why you need to know this? I cannot see why you would have two entry points to do the same thing. The only, spurious case I can think of is if you were providing an app and allowed a UDF to kick something off, but that seems wrong to me.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  2. #2
    Quote Originally Posted by Bob Phillips View Post
    Again, I have to ask why you need to know this? I cannot see why you would have two entry points to do the same thing. The only, spurious case I can think of is if you were providing an app and allowed a UDF to kick something off, but that seems wrong to me.

    Because it affects the control flow . Anything that calls it as a function will manage the response, so the form will be modal and the object that is created as part of that process will be returned and managed locally by the caller. If it is called as a sub then the caller just wants to kick off a process and continue on doing other stuff. The form will be modeless allowing the user to complete the activity and the resultant object will be sent to a central processing class to deal with it. Everything that happens in the form is the same in both cases.

    Thanks for asking, and any thoughts welcome, but I am not looking to re-architecture the application, just looking for a more elegant way to implement what is there now.

    Do you know if it actually possible?

Posting Permissions

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