Hide Task with VBA 
Author Message
 Hide Task with VBA

Hello group!

I'm creating a wizard to simplify the creation of new projects. I have a
template-project, which has various tasks and links between them.
Users can select which of these tasks shall be used in the new project. Only
these tasks shall be presented to the user.
Let's head for my problem: The tasks should not simply be deleted (that
would be a lot of work - the links had to be updated to the new locations
with code) - they should be hidden and their lenght should be set to 0.
I have not found any property in the task object (and nothing similar in the
UI) that lets me hide these tasks.

I am pretty new to MS Project (but not to VBA) -- propably I'm thinking in a
completely wrong direction.

Happy about any ideas!

Thanks for your time,

Fabian



Mon, 19 Jan 2004 06:33:24 GMT  
 Hide Task with VBA
The way to hide tasks in Project is to use a filter. Set some property of
the task (perhaps task.flag1 or ...) which can be used as a filter criteria
and then filter the tasks.

If you are unfamiliar with Project you can get a quick idea of the objects,
methods and properties used for this by recording the sequence of steps to
create and apply a filter.

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.

-Jack Dahlgren, Project MVP

+++++++++++++++++++

Quote:
> Hello group!

> I'm creating a wizard to simplify the creation of new projects. I have a
> template-project, which has various tasks and links between them.
> Users can select which of these tasks shall be used in the new project.
Only
> these tasks shall be presented to the user.
> Let's head for my problem: The tasks should not simply be deleted (that
> would be a lot of work - the links had to be updated to the new locations
> with code) - they should be hidden and their lenght should be set to 0.
> I have not found any property in the task object (and nothing similar in
the
> UI) that lets me hide these tasks.

> I am pretty new to MS Project (but not to VBA) -- propably I'm thinking in
a
> completely wrong direction.

> Happy about any ideas!

> Thanks for your time,

> Fabian



Mon, 19 Jan 2004 07:24:49 GMT  
 Hide Task with VBA
Fabian

In addition to Jack's method can you try one more approach (hopefully it
should give the results you want). I was thinking that copying your selected
tasks, deleting all tasks, then re pasting the copied tasks should work.
When you copy and paste, the links are maintained and any in between link
tasks not selected are perfectly dissolved.

Select your tasks and then run the following macro. Also make sure that
"Auto link inserted or moved tasks" option is selected in
Tools|Options|Schedule.

Sub CopyPaste()
    Application.DisplayAlerts = False
    Application.EditCopy
    Application.SelectAll
    Application.EditDelete
    Application.EditPaste
End Sub

Regards
Venkata Krishna


The way to hide tasks in Project is to use a filter. Set some property of
the task (perhaps task.flag1 or ...) which can be used as a filter criteria
and then filter the tasks.

If you are unfamiliar with Project you can get a quick idea of the objects,
methods and properties used for this by recording the sequence of steps to
create and apply a filter.

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.

-Jack Dahlgren, Project MVP

+++++++++++++++++++

Quote:
> Hello group!

> I'm creating a wizard to simplify the creation of new projects. I have a
> template-project, which has various tasks and links between them.
> Users can select which of these tasks shall be used in the new project.
Only
> these tasks shall be presented to the user.
> Let's head for my problem: The tasks should not simply be deleted (that
> would be a lot of work - the links had to be updated to the new locations
> with code) - they should be hidden and their lenght should be set to 0.
> I have not found any property in the task object (and nothing similar in
the
> UI) that lets me hide these tasks.

> I am pretty new to MS Project (but not to VBA) -- propably I'm thinking in
a
> completely wrong direction.

> Happy about any ideas!

> Thanks for your time,

> Fabian



Fri, 23 Jan 2004 18:44:31 GMT  
 Hide Task with VBA
Venkata,

I didn't try this out, but I'm wondering about your suggestion about keeping
"Auto link inserted or moved tasks" on. I think that that would work with
simple Finish to Start relationships, but it does not truly "maintain" the
relationship. Also would it work if the tasks were linked in reverse order
(from higher ID to lower ID)?

I think your idea is good, I just wonder if it will always give the expected
result.

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.

-Jack Dahlgren, Project MVP

+++++++++++++++++++

Quote:
> Fabian

> In addition to Jack's method can you try one more approach (hopefully it
> should give the results you want). I was thinking that copying your
selected
> tasks, deleting all tasks, then re pasting the copied tasks should work.
> When you copy and paste, the links are maintained and any in between link
> tasks not selected are perfectly dissolved.

> Select your tasks and then run the following macro. Also make sure that
> "Auto link inserted or moved tasks" option is selected in
> Tools|Options|Schedule.

> Sub CopyPaste()
>     Application.DisplayAlerts = False
>     Application.EditCopy
>     Application.SelectAll
>     Application.EditDelete
>     Application.EditPaste
> End Sub

> Regards
> Venkata Krishna



> The way to hide tasks in Project is to use a filter. Set some property of
> the task (perhaps task.flag1 or ...) which can be used as a filter
criteria
> and then filter the tasks.

> If you are unfamiliar with Project you can get a quick idea of the
objects,
> methods and properties used for this by recording the sequence of steps to
> create and apply a filter.

> --
> Please try to keep replies in this group. I do check e-mail, but only
> infrequently.

> -Jack Dahlgren, Project MVP

> +++++++++++++++++++


> > Hello group!

> > I'm creating a wizard to simplify the creation of new projects. I have a
> > template-project, which has various tasks and links between them.
> > Users can select which of these tasks shall be used in the new project.
> Only
> > these tasks shall be presented to the user.
> > Let's head for my problem: The tasks should not simply be deleted (that
> > would be a lot of work - the links had to be updated to the new
locations
> > with code) - they should be hidden and their lenght should be set to 0.
> > I have not found any property in the task object (and nothing similar in
> the
> > UI) that lets me hide these tasks.

> > I am pretty new to MS Project (but not to VBA) -- propably I'm thinking
in
> a
> > completely wrong direction.

> > Happy about any ideas!

> > Thanks for your time,

> > Fabian



Sat, 24 Jan 2004 23:12:12 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Hide Tasks on web task page

2. how to hide task display on task manager in NT

3. Hiding Task ID in Task List

4. VBA task insert into an existing task list?

5. Hiding Windows Task Bar from Code?

6. Hiding Task bar in Access 2.0

7. hide default folders - calendar, journal, tasks

8. hide default folders - calendar, journal, tasks

9. Hide tasks, resources & assignments

10. using window api hiding task bar or disable

11. Hiding in the task Manager

12. Hide App from Task Manager in NT/2000

 

 
Powered by phpBB® Forum Software