Running Another Application Using Visual Basic:
Private Sub Run_Notepad()
Shell("notepad.exe", MinimizedFocus)
'This would open Notepad, as Notepad is in the system folder.
'%SystemRoot% is an environment variable containing the path to the system
folder.
'which is not needed as it is already in the system folder
End Sub
Printing multiplication table of 5 on form:
Private Sub PrintMul_Click()
Dim I As Integer
For I = 1 To 10
Print 5; " x "; I; " = "; 5 * i
Next I
End Sub