Friday, 30 November 2012

Excel VBA -ThisWorkBook Vs. ActiveWorkBook

What is the difference between ActiveWorkBook and ThisWorkbook
ThisWorkBook object refers to the workbook in which the macro code is contained. 

ActiveWorkBook object refers to the workbook that is currently active.

Most times, they will refer to the same workbook. But if the workbook on which running the macro code is not the active workbook then they will point to some different objects.


Thanks.,
Excel Reddy
            MBA(Finance)

No comments:

Post a Comment

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts