ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Active File name (https://www.excelbanter.com/excel-programming/300307-active-file-name.html)

LC[_5_]

Active File name
 
Hi,

On my current opened file, I would like to get the
filename in VBA. Something similar to this that gets the
active sheet name.

sheetname = Activesheet.Name

Thanks,
LC

Chip Pearson

Active File name
 
LC,

Try ActiveWorkbook.Name or ActiveWorkbook.FullName


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"LC" wrote in message
...
Hi,

On my current opened file, I would like to get the
filename in VBA. Something similar to this that gets the
active sheet name.

sheetname = Activesheet.Name

Thanks,
LC





All times are GMT +1. The time now is 02:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com