Drive Letter of current file

Z

zSplash

With the help of many in this usergroup, I have finished my Excel "setup"
file (to "install" my Excel Addin in the proper folders, with shortcuts and
such). In this setupfile, I have an input box to get the "Source Drive"
(which may be unknown to novice users). Since the entire setup hinges on
the proper identification of the drive which contains this setup file (as
well as all the accompanying spreadsheets), I feel bad about getting the
drive letter by user input. Surely there must be a way to programmatically
discover the letter of the drive which has this "setup" file
("MySetup.xls"), to avoid the problem of users mis-identifying where
MySetup.xls resides. Is there?

I hope this is clear.

TIA
 
B

Bob Phillips

left(Activeworkbook.fullname,2)

will return c:, Z:, etc. as long as the file has been saved.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
F

Frank Kabel

Hi
try something like
msgbox Left(Activeworkbook.Fullname,2)

returns A: to Z:
 
Top