Solved

Excel - Macros, VBA, VB Script, and Semantics

Posted on 2014-04-22
3
461 Views
Last Modified: 2014-05-07
Is all code written VBA considered to be a macro?  if not, then what should it properly be called?

And what about VB Script?   Where does that fit in?  The Wikipedia essay is a tad puzzling and doesn't clarify.
0
Comment
Question by:brothertruffle880
3 Comments
 
LVL 27

Assisted Solution

by:MacroShadow
MacroShadow earned 250 total points
ID: 40014693
Not all code is a macro, there are two types of code: 1) function - returns a value. 2) subroutine or macro - a chunk of code that does some processing.

VbScript is a scripting language which is similar to other VB flavors, but unlike VBA (Visual Basic for Applications) which runs in a host program, such as any MS Office application, VBS is a stand-alone language which you write in a simple text file and just give it the .vbs extension.
0
 
LVL 9

Accepted Solution

by:
Christopher Jay Wolff earned 250 total points
ID: 40014716
I guess it depends a bit on who is answering.
Some prefer that Macros are generally the recorded steps that are turned into code by a macro recorder, while VBA is written code that can use functions and variables and perform things with an app that can't be done with the user interface.  Good explanation is comment #4 from Weaver here...
http://www.mrexcel.com/forum/excel-questions/602460-difference-between-macro-code-visual-basic-applications-code.html

VB Script is described as a subset of VBA as in this article.
http://msdn.microsoft.com/en-us/library/ms970436.aspx
0
 

Expert Comment

by:leslieb123
ID: 40049540
A macro is a collection of commands that you can apply with a single click. They can automate almost anything you can do in the program you’re using and even enable you to do things you might not have known were possible. Macros are programming, but you do not need to be a developer or even have programming knowledge to use them. Most macros you can create in the Office programs are written in a language called Microsoft Visual Basic for Applications, usually referred to as VBA. VBA macros are the type addressed in this article. Not all Vb codes are macro.

There are many online essay writing services. If you are looking for essay then this will be better. according to your query they will provide essay. Before selecting any writing services read the honest essay writing reviews and go with that
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now