Vba Function Return Worksheet Object. The following example hides worksheet one in the active workbook. A function is a piece of code that performs a specific task and returns a result.
I want to be able to reference the Worksheet in which the event functions sit, without using Activesheet. It's a common and useful practice that we need to return more values from a function. This article will demonstrate how to return an Array using a VBA Function.
It is very important to understand the concept of Worksheets in VBA because all the time we work with worksheets.
A collection of all the sheets in the specified or active workbook.
If the cell is a text value the Excel ISTEXT function will return TRUE. I want to be able to reference the Worksheet in which the event functions sit, without using Activesheet. The Sheets collection is useful when you want to return sheets of any type.