This programming language may be used to instruct a computer to perform a task.
Execution method:  Compiled (machine code) 

See Also: 

If you know VBA, please write code for some of the tasks not implemented in VBA.
This page uses content from Wikipedia. The original article was at Visual Basic for Applications. The list of authors can be seen in the page history. As with Rosetta Code, the text of Wikipedia is available under the GNU FDL. (See links for details on variance) 
Visual Basic for Applications (VBA) is an implementation of Microsoft's eventdriven programming language Visual Basic, and associated IDE, which is built into most Microsoft Office applications. It was included in Office applications (apart from version 2008 for Mac OS X), other Microsoft applications such as MapPoint and Visio, and at least partially implemented in some other applications such as AutoCAD, WordPerfect and ArcGIS. It supersedes and expands on the capabilities of earlier applicationspecific macro programming languages such as Word's WordBasic, and can be used to control many aspects of the host application, including manipulating user interface features, such as menus and toolbars, and working with custom user forms or dialog boxes.
As its name suggests, VBA is closely related to Visual Basic and uses the Visual Basic Runtime, but can normally only run code within a host application rather than as a standalone application. It can, however, be used to control one application from another using OLE Automation.
VBA has some important limitations, such as restricted support for function pointers which are used as callback functions in the Windows API. It has the ability to use (but not create) (ActiveX/COM) DLLs, and later versions add support for class modules.
As far was Rosetta Code is concerned, Visual Basic and VBA are mostly interchangeable, with minimal editing necessary to move from one to the other.
Subcategories
This category has the following 3 subcategories, out of 3 total.
Pages in category "VBA"
The following 288 pages are in this category, out of 288 total.
2
A
 A+B
 Abbreviations, automatic
 Abbreviations, easy
 Abbreviations, simple
 ABC Problem
 Abstract type
 Abundant, deficient and perfect number classifications
 Ackermann function
 Address of a variable
 AKS test for primes
 Align columns
 Aliquot sequence classifications
 Almost prime
 Amicable pairs
 Anagrams
 Angle difference between two bearings
 Anonymous recursion
 Antiprimes
 Apply a callback to an array
 Archimedean spiral
 Arithmeticgeometric mean
 Arithmetic/Integer
 Array concatenation
 Array length
 Arrays
 Assertions
 Associative array/Creation
 Associative array/Iteration
 Averages/Arithmetic mean
 Averages/Mean angle
 Averages/Mean time of day
 Averages/Median
 Averages/Mode
 Averages/Pythagorean means
 Averages/Root mean square
B
C
 Caesar cipher
 Call a function
 Call a function in a shared library
 Call an object method
 Casesensitivity of identifiers
 Catalan numbers
 Catamorphism
 Character codes
 Check that file exists
 Cheryl's Birthday
 Chinese remainder theorem
 Cholesky decomposition
 Classes
 Closestpair problem
 Collections
 Color of a screen pixel
 Combinations
 Comma quibbling
 Commatizing numbers
 Comments
 Compare a list of strings
 Compound data type
 Concurrent computing
 Conditional structures
 Continued fraction
 Copy a string
 Count in octal
 Count occurrences of a substring
 Count the coins
 Create a file
 Create a twodimensional array at runtime
 Create an HTML table
 CSV data manipulation
 CSV to HTML translation
 Currency
 CUSIP
D
E
F
 Factorial
 Factors of an integer
 Fibonacci nstep number sequences
 Fibonacci sequence
 File input/output
 Filter
 Find limit of recursion
 Find palindromic numbers in both binary and ternary bases
 Finite state machine
 Five weekends
 Fivenum
 FizzBuzz
 Floyd's triangle
 Formatted numeric output
 Fractran
 Function definition
G
H
L
 Langton's ant
 Leonardo numbers
 Letter frequency
 Lookandsay sequence
 Loops/Break
 Loops/Continue
 Loops/Dowhile
 Loops/Downward for
 Loops/For
 Loops/For with a specified step
 Loops/Foreach
 Loops/Increment loop index within loop body
 Loops/N plus one half
 Loops/Nested
 Loops/While
 Loops/with multiple ranges
 Loops/Wrong ranges
 Luhn test of credit card numbers
M
P
 Palindrome detection
 Pangram checker
 Parsing/RPN calculator algorithm
 Parsing/Shuntingyard algorithm
 Password generator
 Peano curve
 Penney's game
 Pentagram
 Perfect shuffle
 Permutations
 Phrase reversals
 Pick random element
 Pig the dice game
 Play recorded sounds
 Playfair cipher
 Plot coordinate pairs
 Price fraction
 Primality by trial division
 Prime conspiracy
 Priority queue
 Problem of Apollonius
 Program name
 Proper divisors
 Pythagorean quadruples
 Pythagorean triples
R
S
 Sailors, coconuts and a monkey problem
 Sattolo cycle
 Search a list
 Send email
 Sequence of nonsquares
 Set
 Sevensided dice from fivesided dice
 Shortcircuit evaluation
 Show Ascii table
 Sleep
 Sort numbers lexicographically
 Sorting algorithms/Heapsort
 Sorting algorithms/Pancake sort
 Sorting algorithms/Quicksort
 Sorting algorithms/Selection sort
 Spiral matrix
 Split a character string based on change of character
 Stable marriage problem
 Stack
 Stack traces
 Statistics/Basic
 Statistics/Normal distribution
 String append
 String case
 String concatenation
 String interpolation (included)
 String length
 String prepend
 Strip a set of characters from a string
 Strip block comments
 Sudoku
 Suffixation of decimal numbers
 Sum multiples of 3 and 5
 System time