BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

vb for absolute beginner

Started by goltoof, May 04, 2011, 05:20:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I'm a complete VB virgin.  Never touched it, I hear it's pretty easy but I can't find a tutorial that doesn't already assume I have everything I need already installed/opened.

I don't know if I already have what I need installed.  Say for example I just installed Visio I got a drawing with some stencils opened, where do I go from there to do a simple VB script?  What do I open, what do I type in and where, what do I click/type to make it run?

I just need some painfully simple example to get started, like a scirpt that'll change the color of a box to red, I don't know...


Let's see --- to get things rolling.

1.)  There's the macro recorder.  You might want to become familiar with that.

2.)  The VB stuff resides under menu bar > tools > macros. 

3.)  Here's a starting reference:

4.)  There are plenty of examples in the SDK, which you can download for free.

5.)  This article from VisioGuy, might be a good start:  His site also has a lot of examples, search for either macros or visual basic, etc.

6.)  John Marshall's site has a lot of VBA examples:  (At least, I think it's his site.)

7.)  Use Visio help.  For example, vba ==> 
    1.On the Help menu, click Developer Reference.
     How do I run in developer mode?
     On the Tools menu, click Options.On the Advanced tab, under Advanced Options, select the Run in developer mode check box.
    2.In the Help window, click Visual Basic for Applications Language Reference.
    3.In the Type words to search for box, type the method, property, function, statement, or object for which you want help, or type a query.

Visio 2019 Pro


Given WrapperDude's introduction, you might want to back up to the basics of there are many 'visual basics'. There's the semi-formal VisualBasic (VB6) compiler product that M$ used to sell, there's the Visual Basic for Applications (VBA) which is fairly standard among the M$ Office products, and of course the VB.Net which is available through the Visual Studio products. Some are free, some are no longer supported, and some may (or may not) support programming of Office Add-ins. Visio comes with VBA (for free) and the Visio (2010) SDK has examples that support both VBA and VB.Net. Sample code to show how to interact with Visio is in the DVS ( As you observed the basics of VB are usually glossed over, since it is assumed your an IT professional and took courses in school on programming and logic.


On suggestion for the absolute beginner. Visio is often used by professionals, so it's hard to find beginner level stuff.

But the basics of VBA are the same for all other office products, so you might perhaps search for an VBA tutorial for Excel (or Word). The basics: How to open the VBE (that is the VBA-Editor, where you can write your code), simple programming structures like If-Statements, Loops, the difference beteen Functions and Subs, Error Handling, ...
will be the same.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 215 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1112KB.
Tokens: post-login.
Cache hits: 13: 0.00126s for 26,766 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]