Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
passing reference arguments to VBA function
Hi,
Does anyone know how to pass/program the use of the :, the (space), and the , (comma) reference designation syntax conventions available to intrinsic Excel funtions to a single VBA function? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
passing reference arguments to VBA function
Excel takes care of resolving arguments in the command line. You just
process the results. For dynamic arguments, one usually uses the parmarray. You then loop through the array and check the type of each argument and process accordingly. As an example with the UDF Public Function InterpretResults(varr) msg = TypeName(varr) If msg = "Range" Then msg = msg & varr.Address End If InterpretResults = msg End Function then in the worksheet I have the formula =InterpretResults(B5:G5 C2:C8) and the cell displays Range$C$5 -- Regards, Tom Ogilvy "Mezon" wrote in message ... Hi, Does anyone know how to pass/program the use of the :, the (space), and the , (comma) reference designation syntax conventions available to intrinsic Excel funtions to a single VBA function? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
passing reference arguments to VBA function
Thanks Tom, I'll give it a try. John
"Tom Ogilvy" wrote: Excel takes care of resolving arguments in the command line. You just process the results. For dynamic arguments, one usually uses the parmarray. You then loop through the array and check the type of each argument and process accordingly. As an example with the UDF Public Function InterpretResults(varr) msg = TypeName(varr) If msg = "Range" Then msg = msg & varr.Address End If InterpretResults = msg End Function then in the worksheet I have the formula =InterpretResults(B5:G5 C2:C8) and the cell displays Range$C$5 -- Regards, Tom Ogilvy "Mezon" wrote in message ... Hi, Does anyone know how to pass/program the use of the :, the (space), and the , (comma) reference designation syntax conventions available to intrinsic Excel funtions to a single VBA function? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Passing Arguments in Excell | Excel Worksheet Functions | |||
Passing Arguments in Excell function | Excel Discussion (Misc queries) | |||
Passing Variable Number of Arguments to a Sub | Excel Discussion (Misc queries) | |||
Passing Arguments | Excel Programming | |||
Passing arguments to a sub routine... | Excel Programming |