ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calling a function and then returning (https://www.excelbanter.com/excel-discussion-misc-queries/94731-calling-function-then-returning.html)

CLamar

Calling a function and then returning
 
How do you call a function and then return to the previous location from
which you called it.

Thanks
Clamar

Ardus Petus

Calling a function and then returning
 
Just assign the function's return value to a variable, like:
myVar = MyFunc(MyArgs)

HTH
--
AP

"CLamar" a écrit dans le message de news:
...
How do you call a function and then return to the previous location from
which you called it.

Thanks
Clamar




CLamar

Calling a function and then returning
 
I dont understand can you go into more detail?

"Ardus Petus" wrote:

Just assign the function's return value to a variable, like:
myVar = MyFunc(MyArgs)

HTH
--
AP

"CLamar" a écrit dans le message de news:
...
How do you call a function and then return to the previous location from
which you called it.

Thanks
Clamar





Ardus Petus

Calling a function and then returning
 

Hi CLamar,

Say you have a function name MyFunc with argument Arg:
Your code might look like this:

var2= 0
MyVar=MyFunc(myArgs)
var2=1

Code will return to the location after you called MyFunc

I Think I'd better redirect you to some kind of tutorial...

Cheers,
--
Ap


"CLamar" a écrit dans le message de news:
...
I dont understand can you go into more detail?

"Ardus Petus" wrote:

Just assign the function's return value to a variable, like:
myVar = MyFunc(MyArgs)

HTH
--
AP

"CLamar" a écrit dans le message de
news:
...
How do you call a function and then return to the previous location
from
which you called it.

Thanks
Clamar







CLamar

Calling a function and then returning
 
I can get the code to do that but I want it to return to the previous
location before it exits the called function

"Ardus Petus" wrote:


Hi CLamar,

Say you have a function name MyFunc with argument Arg:
Your code might look like this:

var2= 0
MyVar=MyFunc(myArgs)
var2=1

Code will return to the location after you called MyFunc

I Think I'd better redirect you to some kind of tutorial...

Cheers,
--
Ap


"CLamar" a écrit dans le message de news:
...
I dont understand can you go into more detail?

"Ardus Petus" wrote:

Just assign the function's return value to a variable, like:
myVar = MyFunc(MyArgs)

HTH
--
AP

"CLamar" a écrit dans le message de
news:
...
How do you call a function and then return to the previous location
from
which you called it.

Thanks
Clamar








All times are GMT +1. The time now is 08:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com