» Inserting the path where the Workbook is saved to the title bar or the status bar using VBA in Microsoft Excel
CATEGORY - Excel Macros - VBA
VERSION - All Microsoft Excel Versions
To add the path address to the Title bar:
1. Press Alt+F11 to open the VBE.
2. In the VBAProject pane, double-click ThisWorkbook.
3. At the top of the Module, open the left dropdown list (General) and select Workbook, then select the Activate event from the Procedure dropdown list on the right.
4. In the Activate macro, type the following code:
Application.Caption=ThisWorkbook.Path
5. To cancel the displaying of the path when activating or opening a different workbook, add the Deactivate macro by selecting Deactivate from the Procedure dropdown list.
6. In the Deactivate macro, type the code:
Application.Caption=" "
7. Copy and insert the two macros to each This Workbook module of any workbook for which you wish to display the path.


Book Store:
Recommended Books:
- East of Eden (Oprah's Book Club)
- Excel 2002 Power Programming with VBA
- Mastering Excel 2000 (for beginner)
- Essentials of Investments with Standard & Poor's Educational Version of Market Insight + PowerWeb + Stock Trak Coupon
- Fish! A Remarkable Way to Boost Morale and Improve Results
- Mortgages For Dummies®
Excel tip question
John Meyer Posted on: 31-12-1969
How can have the path saved to the status bar automatically for all workbooks? When I created the macro, it was specific to the current workbook? Template
John Posted on: 31-12-1969
Save template with a macro in ThisWorkbook module.
Alternate method for all workbooks
Kieran Posted on: 31-12-1969
Another method (works for those 'other' products Word and PowerPoint too) is to :
1. Open the web toolbar.
2. Whilst holding down CTRL and ALT, right-click on the address control and drag up to the menu bar just after the Help menu.
You now have a copy of the filename available for all files as they are opened.
It does not get the file name in the application name as for the original tip, but it does avoid eachfile needing to contian a macro.
Macro
Vineet Gupta Posted on: 31-12-1969
I just wanna create macro to copy a figure in particular column in first sheet and to find the same number (which I copied from sheet 1) in Sheet 2. The problem I am facing is excel is creating Macro to find the specific value, but if I change the values then it is not working. Please help me.Macro to find data
Kevin Posted on: 31-12-1969
There are a number of ways to search for data in this fashion. In the macro, create a named variable, then pick up the data you want to find by storing it's value in the variable. then use the Variable as the search criteria on the second sheet. how to self teach macro books
kanu bhatia Posted on: 31-12-1969
i trying to create macro of some work related forms is there any such books i cac buyThis is a great book!
Roy Posted on: 31-12-1969
Hello,
If you are looking for a great book on the subject of VBA and Macros, check out Writing Excel Macros with VBA, 2nd Edition
How to change values for a selected region ??
Aditya Datar Posted on: 31-12-1969
Hi,
I want to change the values of the selected region on the sheet.
How to access the values of the same region.
Aditya Datar


