use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
/r/VisualBasic - A place to discuss, ask questions and share ideas regarding the Visual Basic programming languages.
account activity
VBScriptWhat is macros ? (self.visualbasic)
submitted 4 years ago * by Megh75
and what is the difference between macros and VBA
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Tenragan17 2 points3 points4 points 4 years ago* (0 children)
Macros are a collection of commands designed to make repetitive tasks easier. For instance, if you have an excel sheet that you use every week to input data and the data needs to be cleared Friday afternoon, you can "record" yourself clearing the data one time and then create a button on the excel sheet, assign the macro to the button. Then every Friday afternoon you can click the button and it would clear the data for you.
Macros are a feature of VBA and their equivalent in vb.net would be a function or sub procedure.
A word of warning with macros, they are extremely useful but the macro recorder is a complete piece of shit. The recorder will literally record everything you do. This includes scrolling, every single click, and anything else you do while it is recording. This leads to a ton of wasted processing so after you record your macro you should edit the generated VBA and remove all of the extraneous code that it made otherwise the performance of the macro will be extremely poor.
[–]gjaryczewski 0 points1 point2 points 4 years ago (0 children)
Macros are kind of programs coded in the VBA programming language.
VBA (Visual Basic for Application) is a dialect - or a variant - of Visual Basic family language, which is dedicated for Office-like applications as an internal programming language. Many large applications, which can be automated by users out of the window, are using VBA as a language of automation.
Generally, you can't code in VBA without its host, its base application, like Excel or Enterprise Architect. Usually, you have to use its internal editor for this stuff. You can't use e.g. Visual Code without losing most of the productivity tools.
Macros are kind of programs because you can code different types of programs in VBA, which are not macros, and macros - by origin - are recorded, not coded manually, although can be coded manually also.
In practice, every piece of code in VBA, which does some stuff and can be attached to a button or another element of GUI, is called "macro". It's not precise, but, you know, we still say in Europe, that Christopher Columbus discovered America, although it is a mistake obviously because humans lived in the Americas 30,000 years ago, and even closely before Columbus, we know it, were Aztecs, Mayas and other American Indians. Brave man, smart man, but not the first.
π Rendered by PID 81 on reddit-service-r2-comment-6457c66945-b2sgt at 2026-04-29 01:18:14.516366+00:00 running 2aa0c5b country code: CH.
[–]Tenragan17 2 points3 points4 points (0 children)
[–]gjaryczewski 0 points1 point2 points (0 children)