EXCEL VBA Questions and Answers

Difference between ActiveWorkbook and ThisWorkbook.

ThisWorkbook refers to the workbook where code is being written while ActiveWorkbook refers to the workbook which is in active state with active window. In case of only one workbook open, ActiveWorkbook is same as ThisWorkbook.