if you use them on a single form, then you can declare the variable inside the form. It won't then start with a value, but then the variable only has scope within that form, and there is no possibility at all of another form using that variable. The other form can have a variable of the same name but it's a "different" variable stored in a different location of memory. I think you can declare a form variable as static and it will keep its value even after the form is closed, and then reopens. It all depends what you want to do with the variable. You can still easily get issues tracking variables.
All of these can have the same name, but they are stored in separate places in your memory, and VBA knows which one you mean each time, as it "tokenizes" each instance with a different address in each case.
You can have a named variable with public scope in a module. This is the widest. Every bit of code in the programme can see this variable.
A private variable in a module visible only to that module
A private variable in a form (module) visible only to that module
You can also have a class module that contains variables, and which makes the variables available only by class methods the programmer designs.
You can also have an variable (or a constant) passed from one location to a procedure (sub) or function as an argument (parameter)
That argument can be byval or byref. If byref, then changing it inside the procedure will change the real variable. If byval then a procedure will make a local copy just for use inside the procedure.
You can even have controls on a form with a similar name.
Offhand I am not sure without checking whether you can declare both a control and a variable with the same name on the same form.
The actual variable used tends to work backwords
So a procedure argument is the lowest level, and that will be used first, with precedence all the way up to a public variable in a module.
So, as the programmer you need to manage how you use your variables. It's just something you get used to without thinking, but if you do accidentally misuse a variable you can get programme errors that become quite hard to track. You won't get a logic/run time error - you just get a variable that doesn't have the value you expect, because the code is using a different instance if a variable than the one you think. and it can be tricky to pinpoint the issue.