Thread: [Solved] Global variables
View Single Post
 
Old 05-01-2019, 11:17 AM
inlanoche inlanoche is offline Windows 10 Office 2016
Novice
 
Join Date: Apr 2019
Posts: 14
inlanoche is on a distinguished road
Default

Quote:
Originally Posted by eduzs View Post
Did you try to set a specific name for the global variable? as Name1234A ??
Did you try using PUBLIC instead of GLOBAL?
Public or Global must be in top of the module, before any sub/function
Yes. At the top of the module, before any other code (besides a comment indicating the use of the Global var) I have this:
Code:
Public userRole As String
Do I need to use GLOBAL or PUBLIC? what is the difference? Documentation I have seen before says to use Public.
Reply With Quote