Excel VBA Worksheet object is the one of the most frequently used object while automating any task with VBA. We refer different Worksheets in Excel Workbooks and perform various operation on Excel Worksheets. We have different Properties, Methods to deal with Excel Worksheet Object. Here you can find a brief explanation about each on most useful Properties and Methods while automation any tasks.
Our objective of building this Excel VBA Explorer is to provide suitable examples on most frequently used methods and properties of Worksheet object. So that you can quickly find the solution, syntax whenever you required it.
We can refer any Excel Worksheets using Worksheet Object. Worksheet is the member of Worksheets Collection.
'We can refer the Worksheet with Sheet Number, Refers the first Sheet of the Workbook Set Sht=Worksheets(1) 'Refers the currently Active Sheet of the Workbook Set Sht=ActiveSheet 'We can refer a worksheet with a sheet name Set Sht=Worksheets("SheetName")
Worksheet methods helps us to perform different actions with Excel Worksheets. For example, we can Activate a Worksheet and Delete a Worksheet or Move Worksheet. And also we can Protect and UnProtect Worksheets.
Excel VBA Worksheet Object Methods
- Activate: To Activate a Worksheet
- Calculate: To Refresh the calculations of Worksheet
- Copy: To Copy a Worksheet
- Delete: To Delete a Worksheet
- Move: To Move a Worksheet
- Protect: To Protect a Worksheet
- Select: To Select a Worksheet
- UnProtect: To UnProtect a Worksheet
Properties of Worksheet object will helps us to deal with various properties of Excel Worksheets. For example, we can change the Worksheet tab color, we can change the name(rename) of the Worksheet, etc.
More Explanation and Examples on Properties of Worksheet Object will be available soon.
Yes, I’ve created a workbook with 16 sheets. I would like to copy this book for each project. However I would like to enter the Project name, Location, and description only on the first sheet and some or all of this to automatic populate the other sheets in the book. There has to be a simple way to accomplish that.
A really helpful and amazingly easy to understand presentation with suitable examples…!