Hi ALl
I want to define a public variable and i am using the following code but it gives me Compile error Invalid outside procedure.
Any help would be much appreciated.![]()
option explicit public ABC1 AS VARIABLE ABC1="FALSE"
Hi ALl
I want to define a public variable and i am using the following code but it gives me Compile error Invalid outside procedure.
Any help would be much appreciated.![]()
option explicit public ABC1 AS VARIABLE ABC1="FALSE"
ABC1 = "FALSE"
should be either part of sub or function. The top party is for declaring variables only
You can not also use the word "Variable" as it is reserved word
Public ABC1 As Long
If you want to set the contents of the variable outside of procedures perhaps you really need to use a Const.
This would make it available throughout your project but the contents would be read-only.![]()
Public Const ABC1 = "FALSE"
Perhaps you should explain why you think you need a public variable.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks