Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
getting the column address of an argument to a user defined functi
Hi I want to write a UDF in which I will need to access the column numbers of
function arguments from inside the body of the function. Example code is: Function UserDefined(leftarg as double, rightarg as double) as double n=worksheet columnnumber of leftarg etc. End function Is there an easy way to access the column or worksheet address of a function's arguments? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
getting the column address of an argument to a user defined functi
Function UserDefined(leftarg as range, rightarg as range) as double
n=leftarg.column etc. End function -- Regards, Tom Ogilvy "Salman" wrote: Hi I want to write a UDF in which I will need to access the column numbers of function arguments from inside the body of the function. Example code is: Function UserDefined(leftarg as double, rightarg as double) as double n=worksheet columnnumber of leftarg etc. End function Is there an easy way to access the column or worksheet address of a function's arguments? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
getting the column address of an argument to a user defined functi
You can't get the address of a "leftarg" because it declared as a Double and
as such does not have an address. If you pass the range, then you can. e.g. Function UserDefined(leftarg as Range, rightarg as Range) as double Dim ColNum As Long Dim WS As Worksheet ColNum=leftarg.column Set WS=leftarg.Parent ....etc NickHK "Salman" ... Hi I want to write a UDF in which I will need to access the column numbers of function arguments from inside the body of the function. Example code is: Function UserDefined(leftarg as double, rightarg as double) as double n=worksheet columnnumber of leftarg etc. End function Is there an easy way to access the column or worksheet address of a function's arguments? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with a converted office 2003 file with user defined functi | Excel Programming | |||
Programming help statements into my VBA custom user defined functi | Excel Programming | |||
Array as Argument in User-Defined Functions | Excel Programming | |||
Array as Argument in User-Defined Functions | Excel Programming | |||
Passing an Array of User-Defined Type to an Argument of a Function | Excel Programming |