vba get workbook name

The solution for “vba get workbook name” can be found here. The following code will assist you in solving the problem.

fileName = ThisWorkbook.Name
Debug.Print fileName ‘ With extension
If InStr(fileName, “.”) > 0 Then
fileName = Left(fileName, InStr(fileName, “.”) – 1)
Debug.Print fileName ‘ Without extension
End If

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts