Help Retrieving filename without .xls attached

M

Marshall

I would like to try and retrieve the filename of the current workbook,
without having the ".xls" portion of it attached.

I'm currently retrieving the
ActiveWorkbook.Name
maybe there is a way to parse this or something?


Any help is greatly appreciated. Thanks.
 
D

Dan E

How about just cutting it down yourself??

Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4)

Dan E
 
J

J.E. McGimpsey

one way:

Dim fName As String
Dim nLen As Integer
fName = ActiveWorkbook.Name
nLen = Len(fName) - 3
If Mid(fName, nLen, 1) = "." Then _
fName = Left(fName, nLen - 1)
 

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