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 TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA script for recognising MS Project View

Status
Not open for further replies.

cberry02

Computer
Joined
Mar 18, 2008
Messages
1
Location
GB
Hi,

I'm trying to get a macro to determine whether or not a Tracking Gantt is currently showing, and if it is, to apply certain changes to the Gantt Bar Style. The reason I need the script to recognise whether or not a Tracking Gantt is currently showing is that if a different view is showing this gantt bar style edit produces an error.

Does anyone know a for or if loop which identifies the current view of the active project?

Thanks,
Chris
 
Here are a couple:

Private Function ActiveViewOfActiveProject() As ViewSingle
Set ActiveView = ActiveWindow.ActivePane.View
End Function

Private Function ActiveView(TargetProject As Project) As ViewSingle
Set ActiveView = TargetProject.Windows.ActiveWindow.ActivePane.View
End Function

Hope this helps.
KW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top