Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Obtaining the filename

Status
Not open for further replies.

mach27

Technical User
Oct 25, 2005
18
0
0
Hi experts

Please have a look at the scenario below in which I want to know the filename where the macro is activated.

Here's the scenario:
1. A macro is saved in Book1
2. The macro is activated in Book2

Result:
The macro should prompt the user that the filename is "Book2"


regards,
mach
 
never mind, I read from another forum that activeworkbook.name is what I needed.
 
You should post VBA questions in forum707 , but the quick answer is ActiveWorkbook.Name

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top