View Single Post
 
Old 11-22-2020, 11:13 PM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Code:
Option Explicit
Public projectPath As String

Static Sub setFilePath()
    Let projectPath = "This is my filepath"
End Sub

Sub ShowprojectPath()
    MsgBox "projectPath = " & projectPath
End Sub
The value of projectPath will disappear when the template/document with the code is closed. It should be available to any other procedure/function in the module. Perhaps it will be available to any other procedure/function in the project; I am uncertain and have not tested.
Reply With Quote