#1
|
|||
|
|||
Show selected summaries and subtasks
I want to create a macro to show summaries and subtasks based on a string input. Here is the sample code. When it finds the string, it shows all subtasks, but not the summary task. Please help -
Public Sub ShowSum() 'Show selected summary Dim vTask As Task, vString As String GetString: vString = InputBox("Enter a string to search ...", "Show Summary") If vString = "" Then Exit Sub Preparation: SelectBeginning OutlineHideSubTasks 'hide all tasks ShowSummariesIfFound: For Each vTask In ActiveProject.Tasks Select Case True Case vTask Is Nothing Case Not vTask.Summary Case InStr(UCase(vTask.Name), UCase(vString)) 'find string Debug.Print vTask.ID, vTask.WBS, vTask.Name vTask.OutlineShowSubTasks Case vTask.PercentComplete = 100 'task completed Debug.Print vTask.ID, vTask.WBS, vTask.Name vTask.OutlineHideSubTasks Case Else End Select Next vTask SelectBeginning End Sub Andre |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question: Hyperlink to other show, but close the current show | habibfikri | PowerPoint | 0 | 12-26-2010 02:37 AM |
How to get the Name of the selected menu | anil3b2 | Word | 0 | 07-26-2010 02:44 AM |
How to extract selected boilerplate into a new doc | mturner296 | Word | 0 | 03-29-2010 07:35 AM |
Temporarily show/hide selected table rows | glricht | Word Tables | 0 | 12-29-2009 05:40 AM |
Selected text and logo in one macro | marijke | Word VBA | 0 | 08-24-2009 07:01 AM |