Drive Letter of current file

  • Thread starter Thread starter zSplash
  • Start date Start date
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
 
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)
 
Hi
try something like
msgbox Left(Activeworkbook.Fullname,2)

returns A: to Z:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top