Table of Contents
Select the First sheet of a workbook
Sub firstsheet() Sheets(1).Select End Sub
Select the Last sheet of a workbook
Sub lastsheet() Sheets(Sheets.Count).Select End Sub
Things to remember while using Macros
- By default, the tab for developers is not displayed in excel. If you can’t see the Developer tab, use the quick access toolbar to activate it.
- By default, Macros are disabled in excel. To execute macros, you will need to enable running macros.
- We cannot Undo an action performed using Macro. Make sure that you have a backup of the data before executing the macro.
- To save macros in a workbook, you must save your workbook in a macro-enabled format *.xlsm
- Always fill in the description of the macro when creating one. This will help you understand your own work if you have to revisit it weeks or months later.