Simple VB Question

phillsheen

Registered User.
Local time
Today, 15:17
Joined
Jun 12, 2006
Messages
86
Morning!
I remember doing something like this in college years ago but I have no idea what its called to search for it.
I have a piece of code that I want to repeat a few times but I dont want to just copy the code 4 times over. I would like to know what its called when you write the code you want then call that code up with a simple line of text.

Any help would be great!

Phill
 
It is called a sub-function or sub-procedure...

It works like so:
Code:
Sub Main
    JustSayHello
    JustSayHello
    JustSayHello
    msbbox "==> Bye"
end sub

sub JustSayHello
    MsgBox "just"
    MsgBox "say"
    MsgBox "Hello"
end sub
 

Users who are viewing this thread

Back
Top Bottom