In the standard module, unskilled Worksheets() workers will always reference an ActiveWorkbook. In ThisWorkbook implicit qualifier is Me and it will refer to the contained book.
Similarly, unqualified Range() or Cells() (or Rows() / Columns() ) in the standard module will refer to ActiveSheet, but in the sheet code module, the implicit qualifier is Me , and will refer to the corresponding sheet.
Unqualified... Where Implicit Qualifier -------------- -------------- ------------------- Worksheets(), ThisWorkbook Containing workbook (Me) Sheets() Any other module Active workbook (via [_Global]) Range(), Cells(), Sheet module Containing sheet (Me) Rows(), Columns(), Any other module Active sheet (via [_Global]) Names()
The easiest way to avoid remembering all of this is to always have completely Worksheets links to Worksheets , Sheets , Range , Cells or Names .
Specify the participant’s call with Me when referring to ThisWorkbook in the code of this module or when referring to Sheet1 in the code of this module.
source share