View Single Post
Old 12-07-2017, 06:30 AM   #1
chrisjames25
Newly Registered User
 
Join Date: Dec 2014
Posts: 281
Thanks: 3
Thanked 1 Time in 1 Post
chrisjames25 is on a distinguished road
Declaring adn defininf public variables

Hi

NIce and simple one for the forum i think.

If i want to declare some variables that i can then reference within the whole vba code for a particular form how do i do it?

At moment i am doing

Code:
Public StrTier1, StrTier11  As String
StrTier1 = "Category"
StrTier11 = "category"
However it is not defining the variable for me.

I get very confused with naming conventions, but i want these to be available for the whole of a form but not be used outside the form so do they need to be public or can then be private. If private how do i define them so not associated with only one event of the form.

chrisjames25 is offline   Reply With Quote