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.