Global Variable within form

D

dhstein

In VBA can I have a variable that is global only within the form. What I
mean is that only the events that are part of the form will use it. Events
on other forms will not have access to it. I hope that's clear and thanks
for any help.
 
D

Douglas J. Steele

Declare the variable at the top of the form's module, before any code. Just
use the Dim keyword, not the Public one.
 
Top