Active Workbook Directory/Path


Posted by Michele on August 30, 2001 6:22 AM

I would like to show, via VBA, in say sheet 1, cell a1, the directory/path of the active workbook. Can you help? I can only get the default directory shown in the Active Application (which is not what I want).
Thanks,
Michael

Posted by Alix on August 30, 2001 6:52 AM

Hi Michael

This is the VBA you need to run:


Sub BookName

Sheets("Sheet1").Select
Range("A1").Select
ActiveCell.Value = ActiveWorkbook.FullName

End Sub


HTH

Alix



Posted by Michele on August 31, 2001 1:04 AM

Thank you Alix. It works so well when we know it!
Can you tell me where I can get a definition of all the VBA language code such as ActiveWorkbook.xxxx, Sheets("Sheet1").Select, etc.
Thanks again,
Michele