View Single Post
 
Old 11-22-2020, 09:39 PM
rekent rekent is offline Windows 10 Office 2016
Novice
 
Join Date: May 2014
Posts: 23
rekent is on a distinguished road
Default Declaring Public variables and accessing in other modules

In the "ThisDocument" object I declared
Code:
Public filePath As String
and the created a sub immediately following it in the "ThisDocument" object that assigns a url to that variable. My understanding is that I should then be able to access that variable from any other module in my project. However, the variable is empty.

Is my understanding about of Public variables incorrect? My intent is to declare and define a URL path as a variable in one location and then reference that variable in multiple different modules within the same project.
Reply With Quote