![]() |
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. |
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. |
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. |
All times are GMT +1. The time now is 01:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com