How To Reference WorkBook, WorkSheet and Cells in VBA

While I was in the process of learning VBA, I found referencing cells the most difficult part and it used to become even more difficult when the cell references were in other workbook/worksheet and not in current workbook/worksheet. Then one day I cleared my concepts and this is what I learnt.

How To Reference Cells in Same WorkSheet

Current worksheet be accessed by referencing ActiveSheet object as below:

Similar to current worksheet, current workbook can be accessed by referencing ActiveWorkbook object.

Now let’s understand how to reference cells in other worksheets and workbooks.

How To Reference Cells in Other WorkSheet

OR use ActiveSheet object as below:

How To Reference Cells in Other Workbook

Hope you find the information shared here useful and informative. Feel free to leave your queries, suggestions, feedback in the comments section below.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">