As the title says, I want to get the name of the file saved as a string. I have
wstitle = Application.Caller.Worksheet.name
and it forces the n to lower case and doesn't work.
As the title says, I want to get the name of the file saved as a string. I have
wstitle = Application.Caller.Worksheet.name
and it forces the n to lower case and doesn't work.
This:
Sub luxation()
Dim s As String
s = ThisWorkbook.Name
MsgBox s
End Sub
will display something like:
Book1.xlsm
NOTE:
The Path is omitted, but the extension is included.
ThisWorkbook is the workbook containing the code.