Here is a quick Excel tip. There is an easy way to get the name of the currently open file/workbook using VBA. Demonstration code is below:
Sub displayName()
MsgBox ActiveWorkbook.FullName, vbOKOnly ‘Display full filename with path
MsgBox ActiveWorkbook.Name, vbOKOnly ‘Display filename only, no path
End Sub
Subscribe to:
Post Comments (Atom)
9 comments:
just what I was looking for. Thanks a lot...
Perfect! - exactly what I needed. Thank you very much
wow! thanks a lot!
That was exactly what I wanted... and not buried in a 1000 word article, excellent.
Just what I needed! Thanks man
Exactly what I needed!! Just excellent work, man. Best. Blog. Ever.
Just what I needed ! :)
thx 4 this :)
Or more simply try: =CELL("filename")
thanks for this information
Post a Comment