Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2011, 02:43 PM
AndreT AndreT is offline Show selected summaries and subtasks Windows XP Show selected summaries and subtasks Office 2000
Novice
Show selected summaries and subtasks
 
Join Date: Jan 2011
Location: So. Ca
Posts: 7
AndreT is on a distinguished road
Default 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
Reply With Quote
Reply

Thread Tools
Display Modes


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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft