Using folder names

M

Mikey May

I am wanting to bring up a message box that needs to
include details of the folder name in which a file is
stored eg P:\CTS\Joe Bloggs\CTS Master

I need the 'Joe Bloggs' folder name to be included in the
message box, ie 'CTS spreadsheet "Joe Bloggs" is
incorrect, please check'

Many thanks in advance
 
B

Bob Phillips

Mikey,

You could use the Split function (assuming XL2000 or later) which will put
the folders into an array and if it is always the second level you just use
say
aryFolders(1)
 
B

Bob Phillips

Here's a substitute Split function for XL97

Function Split97(inVal As String, Delimiter As String) As Variant
Split97 = Evaluate("{""" & _
Application.Substitute(inVal, Delimiter, """,""") & """}")
End Function
 

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

Top