Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 05-01-2019, 11:17 AM
inlanoche inlanoche is offline Global variables Windows 10 Global variables Office 2016
Novice
Global variables
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How does the Enterprise Global and local Global an User Regitry work together? Lupus74 Project 0 08-31-2018 12:18 PM
Array to iterate through variables and trap blank variables Marrick13 Word VBA 5 08-04-2015 06:19 AM
can word: make variables, find appropriate pages, fill out pages with variables, print only those 20GT Word VBA 1 10-15-2014 09:48 PM
Global variables Global Settings lefttoday Word 3 02-03-2011 03:34 PM
Global variables Global template ryalls3857 Word 1 12-27-2010 05:45 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft