Re: Get values for function
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Mon, 08 Oct 2007 12:35:39 -0500
It sounds like you might not understand what you are saying
;-)
This is a very simple concept so if you are having a problem
with it, you should provide enough of your code to
demonstrate whatever issue is causeing trouble. At least
you can then use the names of the arguments/variables to
illuminate your question.
--
Marsh
MVP [MS Access]
Kou Vang wrote:
I guess I'm trying to pass an argument from a sub into a function to get a.
value back into the sub. Would it just makes things easier, if I just moved
the argument into the function and out of the sub, then pass it into the sub?
I hope I understand what I'm saying now.
Kou Vang wrote:
If I call a function, how do I get the values gathered before making a call
to the function if I call the function in the middle of script? I have run
into this several times, as I don't want to have to keep asking for the same
values that may be used inside the function. Exp:
dim x
x = 25
call some function
y = x ' x should be 25
"Marshall Barton" wrote:
It sounds like you are asking about using arguments to a
procedure?? If so, check VBA Help for:
Function Statement
The basic idea is:
Public Function myfunc(abc As Integer) As Integer
myfunc = abc * 2
End Function
then call it somethng like:
p = myfunc(25) + 4
- References:
- Re: Get values for function
- From: Marshall Barton
- Re: Get values for function
- Prev by Date: Re: WHERE clause for SendObject
- Next by Date: Re: Combo Box Display Missing After Office 2003 Service Pack 3
- Previous by thread: Re: Get values for function
- Next by thread: Re: acDialog in Openform not working with acFormDS
- Index(es):
Relevant Pages
|