The worksheets of a workbook are contained in the Any member can be Worksheets collection. specified with its name: Ex: Worksheets(“WSU”) The preceding example applies to the active To access a sheet from a different workbook. (open) workbook: Ex: Workbooks(“Cougs.xlsm”).Worksheets(“WSU”) Counting To count the number of worksheets: Ex: Adding a Worksheet To create a new worksheet in the workbook: Ex: Worksheets.Add ActiveSheet.Name = “CougsRule” Having a Button Send User to a Specific Sheet Sub GoToLists() Worksheets(“Lists”).Activate End Sub Looping through the Worksheets
The worksheets of a workbook are contained in the Worksheets collection. Any member can be specified with its name: Ex: Worksheets(“WSU”) The preceding example applies to the active workbook. To access a sheet from a different (open) workbook: Ex: Workbooks(“Cougs.xlsm”).Worksheets(“WSU”) Counting To count the number of worksheets: Ex: Adding a Worksheet To create a new worksheet in the workbook: Ex: Worksheets.Add ActiveSheet.Name = “CougsRule” Having a Button Send User to a Specific Sheet Sub GoToLists() Worksheets(“Lists”).Activate End Sub Looping through the Worksheets
MgtOp-556-Topic-1-Set-4.docx