VBA code please

N
Niek Zonneveld 👤 Member for 21 years 2 months

My pleasure Hemanth,



If you always want to apply this for the entire project you should replace "ActiveSelection.Tasks" by "ActiveProject.Tasks" in the code I’ve sent you earlier.



H.T.H.



Niek.

H
Hemanth Kumar 👤 Member for 23 years 7 months

Thank You Niek

Dear James



My Project if not opened without enabling macros will be shown as a dis organised crap without any bars



So The viewer has to enable macro to view it. which will trigger a series of other macros which prevent edit,,print,, save,, show copy right informations etc etc



i dont want somebody even my client copy my plan and reuse it






J
James Griffiths 👤 Member for 20 years

There is no need to write a macro. Just highlight all the activities, click on the Task Information icon,General tab and then tick the "Hide Task Bar" box.



HTH.



James.

N
Niek Zonneveld 👤 Member for 21 years 2 months

Hemanth,

This module removes all the bars for selected tasks:



*****************************************

Sub Hide_bars()



Dim t As Task



For Each t In ActiveSelection.Tasks



t.HideBar = YES



Next t



End Sub

******************************************



This is a very simple example. You’ll need to write error handling around it to make it robust.



H.T.H.



Niek.

Forum Sponsor

Top Posters

Julian Pegg
1 posts
Peter Nagy
2 posts
Raymund de Laza
17 posts
Syed_Asad
0 posts
Tony Greyvenstein
0 posts
Ahmed Al-Jubouri
13 posts
Umar Alvi
3 posts
Sibusiso Mahlalela
0 posts
Michael Samanyayi
3 posts
Simon Gumede
0 posts