At the head of a module, I wish to declare some global variables for use in various subs/functions.
What is the difference between
Dim x as string
Private and public control the scope of the variable or object you're declaring.
Private
will only allow members of the relative module/class/whatever to access the instance
public
will allow anything in the same scope as the module/class/whatever to access it.
Dim
defaults to either public or private, depending on what you're working in. A class for example, will default to private. I suggest reading up on encapsulation and OOP to get a better feel for this.