Hi... is it possible by macro to know its file name??? something like
variable receaving "teste.xls" as valu
Nick Hodge - 05 Jul 2006 18:24 GMT
Something like
Sub GetWorkbookName()
Dim wbName As String
wbName = ActiveWorkbook.Name
MsgBox wbName & ".xls"
End Sub

Signature
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS
> Hi... is it possible by macro to know its file name??? something like a
> variable receaving "teste.xls" as value
Dave Peterson - 05 Jul 2006 19:11 GMT
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).
> Hi... is it possible by macro to know its file name??? something like a
> variable receaving "teste.xls" as value
[quoted text clipped - 4 lines]
> redf1re's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=31258
> View this thread: http://www.excelforum.com/showthread.php?threadid=558539

Signature
Dave Peterson
redf1re - 05 Jul 2006 20:52 GMT
thanx all
:)

Signature
redf1re