VBA script for recognising MS Project View
VBA script for recognising MS Project View
(OP)
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
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





RE: VBA script for recognising MS Project View
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