I have a sub where I have the following code:
Dim ProjectPath As StringDim str_ProjectPath As Stringstr_ProjectPath = "$(_USTN_PROJECTROOT)"ProjectPath = ActiveWorkspace.ExpandConfigurationVariable(str_ProjectPath)Debug.Print str_ProjectPath
What I am trying to do is get the path of the current project but I am getting a path not found error and the debug message just reports $(_USTN_PROJECTROOT). If I use expand echo $(_USTN_PROJECTROOT) within the keyin window I do get the correct path showing in the message centre so I am hoping someone can highlight where I've gone wrong.
Thanks
Try either of these...
Debug.Print "Expanded value of " & _ "_USTN_PROJECTROOT=" & _ ActiveWorkspace.ExpandConfigurationVariable ("$(_USTN_PROJECTROOT)")
Debug.Print "Value of " & _ "_USTN_PROJECTROOT=" & _ ActiveWorkspace.ConfigurationVariableValue ("_USTN_PROJECTROOT")
Note that I've used VBA continuation characters (the underscore) only because long lines of code don't wrap properly on this website.
Regards, Jon Summers LA Solutions
Thanks for the input Jon,
As Robert had suggested it was a typo error and having changed that it now returns the correct value as required.
Barry