List of Documents
Learn how to use the VBA With statement to eliminate repetitive object references, improving code readability and maintainability. This guide covers basic syntax, practical examples, and best practices.
This page introduces how to close a workbook with VBA using the Close method.
To close an Excel workbook without saving in VBA, pass SaveChanges:=False to the Close method. This article covers code examples for the active or a specific workbook, avoiding the confirmation dialog, and safely closing all other workbooks.
Learn how to open a workbook using VBA with specific code examples.
This page introduces how to open a workbook as read-only using VBA.
Learn how to add Excel worksheets with VBA. Covers Worksheets.Add basics, sheet naming rules and forbidden characters, positioning with Before/After, adding several sheets, and fixing duplicate-name errors, with code examples.
Learn how to delete Excel worksheets with VBA. Covers the Delete method, suppressing the confirmation prompt with DisplayAlerts, checking whether a sheet exists, deleting multiple sheets, and fixing cases where a sheet cannot be deleted, with code examples.
This guide explains how to retrieve a specific worksheet using VBA. It covers methods to specify by name, by index, and how to get the currently active worksheet.
Learn how to move worksheets to the start, the end, or before/after a specific sheet with the Excel VBA Move method, including multiple sheets, existence checks, and what happens when you omit the arguments.
Learn how to retrieve values from specific cells and ranges in a worksheet with VBA: the Range and Cells properties, working with 2D arrays, and practical examples.