Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Difference between "Public Sub" and just "Sub"


DshWinchester
 Share

Recommended Posts

I have a wrong idea about it.
For me it's like 'Sub' was just for one 'Index'

Can anyone say

for example

> **Public Sub/Sub** MyClass1(byval Index as long)
>   if getplayerclass(index)=1 then
>     playermsg index,"You got mojo",blue
>   else
>     playermsg index,"You damn gay",pink
>   end if
Link to comment
Share on other sites

Oh,so Private is just for the module that has it
Public is for all

then

> "Public Sub MyClass(byval Index as long)"

is the same thing than

> "Sub MyClass(byval Index as long)"? < without 'Public'

or

> 'Sub MyClass'

is the same thing as

> 'Private Sub'

?  .-.

thanks soul.
as always hellping people
Link to comment
Share on other sites

-The Public keyword allows you to declare variables and procedures that are visible outside that code module, form, or class.

-The Private keyword allows you to declare variables and procedures that are not visible outside that code module, form, or class, but are visible only within the current scope.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...