As for the Visual Basic question - STFW. I hate being rude about it, but there are literally millions of pages which have examples of VB code online. For that matter, any bookstore or library should have a double dozen VB primers which you could take a peek at. A search on
Visual Basic "Hello, World!" brings up dozens of examples, including ones from MicroSoft themselves.
You have to learn how to do your own research. Using Google isn't rocket science. I'd be happy to help with any specific question you have (e.g., "Why are there four different ways of calling a function?" - OK, bad example, I doubt that even M$'s own developers could give a good explanation for
that) but the really general and basic things like these can be found faster and easier on your own, as I've told you before. I mean, you could have gone to Microsoft's own website to get the answers to the first two questions, without any trouble at all.
Oh, hell, I might as well give you an answer anyway. From the immediate window, you can simply run
Code: Select all
msgbox "Hello, World!", vbOKOnly, "Hello, World!"
Which should pop up a messagebox with both the title and the body reading, "Hello, World!" (VB has no console mode, at least not prior to VB .NET). For a more elaborate (if rather unusual) example, see the
ACM "Hello, World!" Project (a good page to look at in general). See the Google link above for scads and scads of other examples.
One thing to notice about VB is that generally speaking, you would not start with code but with a form, and IIUC, all standalone VB programs need to have at least one (or at least they did before VB .NET). While you can generate forms by means of code, the IDE strongly encourages the use of the visual tools; you would almost never write a program entirely as code in the conventional sense. This makes it rather hard to show an example without a lot of screenshots, as you no doubt see in the tutorials.
I should also add that, for all my dislike of it, it really valuable (indeed, very nearly required) to learn Visual Basic for Applications if you are doing any extensive Windows work. While I would recommend having a decent background in a few other languages first to help avoid getting into any bad habits (I say the same thing about C++, too), VBA is something that won't hurt you to know.