PDA

View Full Version : Extract FIlename (including dots) without extension



Cinema
01-13-2019, 01:41 PM
Hello,

I canot extract the filename without ".xlsm" because of the dots in the name.

The filename is: "Test 01.01.2019"

Here are my tries:


FileName = Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 5)

FileName= Len(ThisWorkbook.Name, InStrRev(ThisWorkbook.Name, ".") - 1)

The Workbook is saved as pdf data with the name "Test 01.01" and if I delete the date then I can save it normally as xlsx

macropod
01-13-2019, 02:27 PM
Cross-posted at: https://www.mrexcel.com/forum/excel-questions/1083582-extract-filename-including-dots-without-extension.html
Please read VBA Express' policy on Cross-Posting in Rule 3: http://www.vbaexpress.com/forum/faq.php?faq=new_faq_item#faq_new_faq_item3