how to show current project name on toolbar

J

Joy

we have a toolbar with many macros

now, i want on the toolabr, it shows the name of the currently viewed ms
project,(we may open many projects at the same time)

I am not sure whether it is possible in vba

I used Dim curproj As MSProject.Project
Set curproj = Application.ActiveProject
but it just showed the most recently loaded one, not the one I
am viewing now
 
R

Rod Gill

ActiveProject is the active project. You must be viewing two or more project
windows at the same time? The active one is provided by ActiveProject.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
Top