Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB worksheet function parms
I've written a worksheet function in VB that is used by entering it in a cell
in the worksheet with two parameters. I'd like to find a way to know what row or column the passed parameters came from so that I can conditionally determine the function output based on that row or column. Is there an object, method or property that will tell me this info about passed parameters to a VB function? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB worksheet function parms
Unless your function parameters are Range objects, there is no
way to determine where the values came from. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Mark H" wrote in message ... I've written a worksheet function in VB that is used by entering it in a cell in the worksheet with two parameters. I'd like to find a way to know what row or column the passed parameters came from so that I can conditionally determine the function output based on that row or column. Is there an object, method or property that will tell me this info about passed parameters to a VB function? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB worksheet function parms
And if the parameters are range objects, i.e. cell addresses, then what? can
I say parm.col or something? "Chip Pearson" wrote: Unless your function parameters are Range objects, there is no way to determine where the values came from. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Mark H" wrote in message ... I've written a worksheet function in VB that is used by entering it in a cell in the worksheet with two parameters. I'd like to find a way to know what row or column the passed parameters came from so that I can conditionally determine the function output based on that row or column. Is there an object, method or property that will tell me this info about passed parameters to a VB function? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB worksheet function parms
Hi Mark,
Mark H wrote: And if the parameters are range objects, i.e. cell addresses, then what? can I say parm.col or something? If you pass in Range objects, then you can get the column & row like this: Public Function TESTFUNCTION(range1 As Range, _ range2 As Range) As Variant TESTFUNCTION = "(" & range1.Row & "," & range2.Column & _ "),(" & range2.Row & "," & range2.Column & ")" End Function -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] "Chip Pearson" wrote: Unless your function parameters are Range objects, there is no way to determine where the values came from. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Mark H" wrote in message ... I've written a worksheet function in VB that is used by entering it in a cell in the worksheet with two parameters. I'd like to find a way to know what row or column the passed parameters came from so that I can conditionally determine the function output based on that row or column. Is there an object, method or property that will tell me this info about passed parameters to a VB function? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reference the worksheet from a multiple worksheet range function ( | Excel Worksheet Functions | |||
Can the offset worksheet function reference another worksheet | Excel Worksheet Functions | |||
Excel Start-up parms | Excel Programming | |||
formula/function to copy from worksheet to worksheet | Excel Programming | |||
Can't see macros with parms in Tools -- Macros | Excel Programming |