Consulting

Results 1 to 2 of 2

Thread: Extract FIlename (including dots) without extension

  1. #1

    Extract FIlename (including dots) without extension

    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

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    3,700
    Location
    Cross-posted at: https://www.mrexcel.com/forum/excel-...extension.html
    Please read VBA Express' policy on Cross-Posting in Rule 3: http://www.vbaexpress.com/forum/faq...._new_faq_item3
    Cheers
    Paul Edstein
    [MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •