Excel VBA Examples
The following Excel VBA examples have a little bit of everything. There are how to tutorials, the basics of VBA, practical uses of VBA right up to the use of arrays and dictionaries. This Excel VBA repository has a little for everyone. I started this VBA section with what I founds interesting and it has grown over the years. It is now filled with interesting problems which have been completed and
- VBA Overview
- VBA Golden Rules
- Dim Statement Meaning
- Trapping Dynamic Ranges
- Dim Statement Meaning
- VBA Last Used Row
- Referring to Sheets
- Autofilter with VBA
- Autofilter Between Dates
- Autofilter Multiple Conditions
- Advanced Filter
- Advanced Filter Between Dates
- Sorting with VBA
- Using Special Cells
- Looping Constructs
- Looping Through Worksheets
- Do Until Loop VBA
- Do While Loop VBA
- Find with VBA
- Replace with VBA
- Events
- Automating Pivot Tables
- Hiding Columns
- The VBA Array
- Compare Two Lists with VBA
- List Unique Items
- Pass VBA Variables Between Macros
- Create Folder with VBA
- Excel Solver with VBA
- Status Bar Update with VBA
Transferring Data
The following section deals with the use of data primarily for transferring data and the tools that you can use to transfer data from one place to another. From Excel’s auto and advanced filter to the copying of data between sheets to creating a PDF with an Excel spreadsheet. This area is filled with consolidation techniques with VBA.
- Import Data with VBA
- Export Data with VBA
- Copying Data With VBA
- FillDown to the Bottom of a Range
- Consolidate Sheets
- Consolidate Sheets with Variant
- Consolidate Sheets with Criteria
- Opening Files
- Copy Sheet and Save
- Copying n Rows
- Moving Data Columns
- Save File to Desktop
- Hide Columns
- Save Excel as PDF with VBA
- Output Part Range with Array
- Non Continuous Range with VBA
- Import Access Query
- Parameter Query to Excel
- Autofilter to Array
- Transfer from Excel to Word
- Using Evaluate
- Open Workbooks Run Macro
- List Files in Sub Directory
- Open Sub Directories VBA
- Fill Active X Combo
- Import Text File with VBA
- Creating PDF from Excel
- Move Picture with VBA
- VBA Refresh Pivot Table
General VBA Tips
- Tick All ActiveX CheckBoxes
- Autofit Merged Cells
- Subtotal on the Fly
- Hide Rows with VBA
- Unique Random Number Generator
- Unhide All Sheets with VBA
- Automate Workbook Email
- Dollars to Words with VBA
- Show Picture with VBA
- Cell Interior Colour in Excel VBA
- Link Hyperlink to Excel Macro
- Find Duplicates with VBA
- Add Colour to Shape VBA
- Protect Unprotect a Worksheet with VBA
- Cascading Dynamic Drop Downs
More VBA
- Sum with VBA
- Change Event Workbook Level
- Print First Page
- Sum Non Continuous Range with VBA
- Delete All Macros
- Convert Text to Number VBA
- Multiple Level Sorting with VBA
- Change Case with VBA
- Create Multiple Files from a List
- Remove All files from Folder
- Copy Each Sheet from Closed Workbooks
- Cascading Dynamic Drop Downs
- Add Boarders with VBA
- Custom Sort with VBA
- Populate a Userform with VBA
- Copy Date File Created with VBA
- Copy Non Adjacent Columns with VBA
- Automating Pivot Tables with VBA
- Delete All Pivot Tables with VBA
- Find All Values in a Range with VBA
- Remove Duplicates in Multiple Columns
- Open to Specified Network Path
- Printing Userform Excel VBA
- Sum Rows Remove Duplicates
- Excel Cloud Page