У нас вы можете посмотреть бесплатно What is the difference between ThisWorkbook and ActiveWorkbook in VBA или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Grab the Free VBA Quick Reference Guide https://www.chrisjterrell.com/excel-v... It is common to see two references to a Workbook in VBA – the first and most common is the ActiveWorkbook object and the second is ThisWorkbook. If the code is running code in the same workbook these will act identically because both will keep pointing at the same Workbook. However, when you are referencing multiple workbooks you will run into problems referencing the wrong workbook. So what is the difference The ActiveWorkbook is last used workbook or the workbook you are currently working in. In other words, you may have many workbooks that are visible but Windows only views on of those visible workbooks the active workbook. Therefore Excel considers the Active workbook that currently selected is considered or Active. The ThisWorkbook property is easy. It is the workbook that the code is executing from. It is the parent workbook from which the code is stored. Specifically it will return the Workbook object that represents the workbook where the current macro code is running. Code ======== Sub test() Debug.Print ThisWorkbook.Name Debug.Print ActiveWorkbook.Name End Sub