Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about something like:
Public Function foo(byRef arg1 As Variant, _ Optional byVal RangeResult As Boolean = False) As Variant Dim vArr As Variant If Typeof Application.Caller is Range then RangeResult = True 'Function stuff here If RangeResult Then foo = Application.Transpose(vArr) Else foo = vArr End If End Function Then your functions that call foo are responsible for determining whether or not to return a result appropriate for a range, e.g.: a = foo(b) returns a 1-d array a = foo(b, True) returns a 2-d array In article , Matthew Pfluger wrote: I need to know if a function has called a function. I'd like to not add extra input arguments. Is there read access to the Call Stack or would a Global Variable be the key here? Thanks, Matthew Pfluger |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call a VBA module from Microsoft Access | Excel Programming | |||
error 28: out of stack space call function | Excel Programming | |||
Call Stack disabled | Excel Programming | |||
call stack question | Excel Programming | |||
call stack question | Excel Programming |