Vba Active This Worksheet. In VBA, you have two collections that can be a bit confusing at times. Difference between Worksheets and Sheets in VBA.
The code below would hide all the worksheets in the workbook (except the active sheet), such that you can not unhide it by right-clicking on the sheet. Microsoft ISV Community Center. > Visual Basic for Applications (VBA). The active workbook may or It's perfectly acceptable to use this property to reference the active workbook from code inside the The Worksheets collection contains all the sheet objects in a workbook.
This Excel VBA macro inserts a worksheet after an active sheet.
ActiveSheet VBA object is very usefull while automating tasks and working on currently active sheet in the active workbook window.
You can do this using VBA. I've noticed that toggling to an alternative Worksheet changes the reference in Activesheet to the new Worksheet, yet the VBA executes the VBA from the original Worksheet. Active cell means the specific cell which is active in the current active worksheet.