Using enums makes code self-documenting and avoids magic numbers.
To use the library for (which provides "Intellisense" auto-complete), follow these steps in the Excel Visual Basic Editor: HOW TO: Handle Excel Events in a twinBASIC COM Addin microsoft excel 16.0 object library
' Clean up xlWorkbook.SaveAs "C:\example.xlsx" xlWorkbook.Close Set xlWorksheet = Nothing Set xlWorkbook = Nothing xlApp.Quit Set xlApp = Nothing End Sub Using enums makes code self-documenting and avoids magic