between "global" and "public"

Y

ykffc

For example (in a module of an Access project):
Global xx as String
versus using
Public xx as String

When declaring similar variables to reference objects, is there any
difference between using the keyword global and the keyword public.
 
P

Paul Overway

No real difference. Global is a holdover from early versions of VB/VBA.
Public is the more modern syntax, but in respect to function/purpose/usage
there is no difference.
 
D

Douglas J. Steele

No difference whatsoever. I can't remember which came first, but when they
switched to the other term, they kept the original in just to make it easier
to convert from version to version.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top