| 
        IMPORTANT NOTE:   If this is your first experience with VB, don't be afraid to experiment. This is   hands-on stuff! Remember that VB is a Microsoft product, therefore it works with   the standard Windows interface. All the functions you know from MS-Office work   the same way here: Copy (Ctrl+C), Cut (Ctrl+X), Paste (Ctrl+V), the Undo button or (Ctrl+Z) and the re-do (Ctrl+Y) are great shortcuts that can help.  The first  program we will write is to get a message box to display the words ‘Hello Universe ’. This is  traditionally the first program that all budding programmers learn to write.  
        Open  Microsoft Visual Basic.  Start >  Programs > Microsoft Visual Studio 6.0 > Microsoft Visual Basic 6.0.
  
Click File > New Project.
The  “New Project” window will appear.  Select  the Standard EXE icon  
 
Click       
 
 
Your  screen should now look something like this…
 
  
 
 
We will not use a form in this program.  Click Project > Remove Form1. 
  
The box containing the form  will disappear.          
 
In the Project menu click Project  > Add Module
 When the following box appears, make sure the Module icon  is selected in the New tab, then click  
 
  
 
Your screen should look like this
  
 
Drag the mouse through the code below to select it. Press Ctrl+C (together) on the keyboard. Click into the new blank module window and press Ctrl+V (together) this copies and pastes the code.
 Sub Main()
 
 MsgBox "Hello Universe, Mum and Everyone Else. I'm a Computer Programmer."
 
 End Sub
 
 
  
Click the Start  icon  on the Standard toolbar or press F5 on the keyboard to run the program. 
 
 The message “Hello Universe. Mum and Everyone Else. I'm a Computer Programmer!” should appear on the  screen in a message box. 
 
  
 
 
Click OK  
 
Now look at the code. The begin program code is Sub Main(). The end program code is End Sub The code in between these statements is the main program, msgbox creates a message box and the statement written in the speech marks is what appears in the message box.
 IF YOUR PROGRAM DOES NOT WORK - CLOSE DOWN VISUAL BASIC 6 (WITHOUT SAVING) AND START AGAIN.
In the Module window, change the text in the speech marks to  This is my second program.  the whole code should look like this:
 Sub Main()
 
 MsgBox "This is my second program"
 
 End Sub
 
 Note the speech marks around the text to appear in the msgbox.
 
 
Run the program. 
 Now make the message box say something else that you choose.
 
Read the code, delete it and try to re-write it yourself - copy and paste the code above if you getstuck.
 
 
 Now add 2 or more message boxes.
 
Delete any code in the module and copy and paste this code
 Sub Main()
 
 Msgbox "This is my first message box. "
 Msgbox "This is my second message box. "
 Msgbox "This is my third message box. "
 
 End Sub
 
 
As you can see there is no limit to the amount of message boxes you can create.
 
Experiment with some message boxes of your own.  
 IF YOU HAVE PROBLEMS GETTING YOUR CODE TO RUN
 
         CHECK YOUR SPELLING CHECK CODE IS CORRECTDELETE EVERYTHING AND REPASTE THE CODE GIVENIF NOTHING WORKS CLOSE VB6 (WITHOUT SAVING)  AND START AGAIN 
 |