Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21237

[RESOLVED] Return a Value from a Built-in Procedure?

$
0
0
Hello,

Please excuse the title, I really have no idea what else to call it. But I'm trying to make a function that returns a value off a procedure called from a private Module, say, Command1_Click(), now I'm not sure if this is achievable using the AddressOf callback approach but I bumped into this nice thread by Joacim, and thought this could be related to that, somehow. I tried a thing or two and could not get one to work without crashing the IDE.
But to be more specific, I have 2 (indexed) buttons on a "Click" procedure:
Code:

Private Sub cmdAnswers_Click(Index As Integer)
    'How do I make a function that returns the Index of this procedure?
End Sub

Basically I want to do a function like the MsgBox that returns the response of a user's input, and in this case, it'd be which button is clicked. I named them "Yes" and the second one, "No", and perhaps may as well create another one that reads "Maybe". So... is this possible? Thanks in advance.

Viewing all articles
Browse latest Browse all 21237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>