I have to agree with Tony. It seems odd.
"Is there a function or command that will check where the application lives and if so can it report back where it was started from to give me the drive letter"
Applications do not "live" anywhere, except in memory when they are executing.
Files "live" in specific locations, yes.
I have to wonder about a situation where the executable of an application be
either on a network drive , or a local drive:
"What I would like to me able to do is have the system check if the programme is running from the network drive or the C: drive as the files it needs are in different locations"
AND, that you need to know which. Where data files are loaded from (or saved to), yes, I can see that, but the executable? GetDriveType does not check for where an executable (now in memory one would assume) was executed
from.
However, on the other hand, for Office apps, as Tony mentions, you can indeed get the drive the executable was executed from, with Application.Path.
So, yes, you can find out if Word - say - was executed/started from a network drive, or a local drive.
BTW: should your Sub ShowDriveLetter(drvPath) actually be a Function, returning the value of Drive? Or is Drive a Public variable?
As it looks there, while Drive is given a value (either dr or "Z:"), it does not seem to go anywhere.
"A little piece of heaven
without that awkward dying part."
advertisment for Reese's Peanut Butter Cups (a chocolate/peanut butter confection)
Gerry