ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Interpretation of a piece of code (https://www.excelbanter.com/excel-discussion-misc-queries/171028-interpretation-piece-code.html)

FARAZ QURESHI

Interpretation of a piece of code
 
Can any friend explain to me what is the following part of code means:
Application.Caller.Parent.Evaluate

Dave Peterson

Interpretation of a piece of code
 
I bet that this was used in a UDF.

If I'm right...
Application.caller would be the cell that held the UDF.
application.caller.parent would be the worksheet that held that cell.

application.caller.parent.evaluate means to use that worksheet for any
unqualified ranges in the string that is being evaluated.

msgbox worksheets("sheet1").evaluate("a1+b1")
and
msgbox worksheets("sheet2").evaluate("a1+b1")

would use A1 and B1 from Sheet1 and Sheet2 (respectively)

FARAZ QURESHI wrote:

Can any friend explain to me what is the following part of code means:
Application.Caller.Parent.Evaluate


--

Dave Peterson

Bob Phillips

Interpretation of a piece of code
 

"Dave Peterson" wrote in message
...
I bet that this was used in a UDF.

If I'm right...


It was. It was something I gave him.



Dave Peterson

Interpretation of a piece of code
 
It looked like your typing <vbg.

Bob Phillips wrote:

"Dave Peterson" wrote in message
...
I bet that this was used in a UDF.

If I'm right...


It was. It was something I gave him.


--

Dave Peterson


All times are GMT +1. The time now is 05:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com