R redf1re Jul 5, 2006 #1 Hi... is it possible by macro to know its file name??? something like variable receaving "teste.xls" as valu
Hi... is it possible by macro to know its file name??? something like variable receaving "teste.xls" as valu
N Nick Hodge Jul 5, 2006 #2 Something like Sub GetWorkbookName() Dim wbName As String wbName = ActiveWorkbook.Name MsgBox wbName & ".xls" End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk (e-mail address removed)
Something like Sub GetWorkbookName() Dim wbName As String wbName = ActiveWorkbook.Name MsgBox wbName & ".xls" End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk (e-mail address removed)
D Dave Peterson Jul 5, 2006 #3 You can get it via: activeworkbook.name activeworkbook.fullname and maybe you'd want activeworkbook.path ..fullname will include the path. .Path will just give the path. But both .name and .fullname will include any extension (if the file was saved with an extension).
You can get it via: activeworkbook.name activeworkbook.fullname and maybe you'd want activeworkbook.path ..fullname will include the path. .Path will just give the path. But both .name and .fullname will include any extension (if the file was saved with an extension).