I’ve tried to assign the current workbook to a workbook object:
Dim wb As Workbook, ws As Worksheet, rng As Range
wb = ThisWorkbook
In this instance, the code is running in and is the currently active workbook. But I get the following error, where am I going wrong:
91 - Object variable or With block variable not set
When assigning an object to a variable you have to use
Set