• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Query regarding Intersect Method

somnath6309

New Member
Dear Sir/Madam,

I have given the full code listing for the purpose of convenience. I want explanation as much as possible regarding the line in the code:

Set TempRange = Intersect (args(i).Parent.UsedRange, args(i)).

I myself used the code “Range(“A1”).Parent.Name” to understand the Parent property and I found that Sheet2 is the parent of Range A1 because I wrote the code in Sheet2.

But here, I cannot grasp the idea that who is the Parent of args(i) and what is the ultimate outcome of “Intersect” method used in this code?

Moreover there is a section in the code like:

Case “Variant()”

n = args(i)

For m = LBound(n) To UBound(n)

MySum = MySum(MySum, n(m)) ‘recursive call

Next m



Which I Cannot understand. Kindly provide some explanation if possible.
 

Attachments

  • vba_code.xlsx
    10 KB · Views: 2
Back
Top