Various
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
Its good idea.
If I do this to my boss, he will kill me :)
Good luck
thanks lee
but my issue was how to delete other views.
i found the answer
that is you have to remove views from global .mpt to clear all the views.
coming back to VBA
thanks Zhang, for you tip
i started writing codes
i added following codes
that is on close
text color change to white
open the view " bulshitview"!!!!!!!
save file
on open chane text color to black
and open the view to "good View"
if anybody disable macros, he cant see my project
and if he enable macros, he cant save the project
got the point ?
is’nt that great?
thank you
hemant
Ok, you need not chage the save code.
that make no save if the user do not know the password.
But make sure when you send this project to others, the file is saved with reversed task name.
But other change made by the user will also be saved
Hi,
The above code is just a demo,to make it functional,you need modify the previous save code so after the taskname was reversed , the porject will automatically saved without asking for a password.
Hi,
1. insert a module and add the following code
=======================================================
Sub ReverseTaskName()
Dim lngTaskCount As Long
Dim i As Long
Dim strTaskName As String
Dim strRTaskName As String
Dim intLen As Integer
Dim j As Integer
On Error GoTo ter
lngTaskCount = ActiveProject.Tasks.Count
For i = 1 To lngTaskCount
strRTaskName = ""
strTaskName = ActiveProject.Tasks(i).name
intLen = Len(strTaskName)
For j = 1 To intLen
strRTaskName = strRTaskName & Right(strTaskName, 1)
strTaskName = Left(strTaskName, Len(strTaskName) - 1)
Next j
ActiveProject.Tasks(i).name = strRTaskName
Next i
ter:
End Sub
============================================================
2. under "thisproject" add the following code
----------------------------------------------------------
Private Sub Project_BeforeClose(ByVal pj As Project)
Module1.ReverseTaskName
End Sub
then add module1.reversetaskname to project_open,so it looks like:
---------------------------------------------------------
Private Sub Project_Open(ByVal pj As Project)
Set myapp.App = Application
Module1.ReverseTaskName
End Sub
-----------------------------------------------------------
HTH
Interesting
But How
Can You Work On It Please ?
Hi Hemanth Kumar,
Yes, anyone can choose disable the micro when opening the project.
You need more micros to sovle this issue.
the idea is when the user close the project, the micro will be run, it will make the porject un-readable. e.g. chage the task name start design to ngised trats. then make another micro which will change ngised trats backto start design when opening the project.
if someone disable the micro when opening, he cant read the project.
Lee
Please
Read Earlier Posts
we are inserting a class module in project
which becomes disabled once one disable macros when starting up MSP project
Macro can be disabled in two ways:
1. to rise-up the security of macro-alert (Marcor/security..)
2. to erase any code under VBA window (Atl+F11)
Lee
But Lee I Dont Want Anymore Views Other Than Mine
Thanks Dear Zhang For The Project
But Anybody Can Disable Macros When Opening The Project,
Your Code Works When Macro Is Enabled!!!!
Think Big
Hemanth
To delete the view from Tools/Organize still wont work when some others open your file on his computer, I would suggest you to rename your view or filter, customized group etc with "AA", then they stays together at the top.
Lee
thank you zhang
i will look in to it
but my 2nd question is not yet answered.
thanks
hemant
Hemanth Kumar,
Ive sent you the project.
Dear Zhang
My Email Address : [email protected]
i dont mind copying tasks, But Outline structure ,colorschemes,etc
thanks
I can not find you email-address.
Yes, anyone can disable the micro when opening, but you can add some code, when save the project it will make the project un-readable,only you select to run the micro when opening, then it will restore the project.
I dont think its worth to do all these.
They still can copy all the tasks, then paste to new project.
Anyway PDF is the best choice, or you need to use P3
Dear Zang
But any body can disable macros when opening
and VBA is greek to me ,i copied your codes ,but does not work!!!!!!!!!!!!,can you mail me a protected project to me
thanks
Simple. Keep two copies. One, in a hidden folder being the real one, the second, available to your boss, being fake - you could change dates, durations, add in spurious activities - "Go to nightclub", "Sack the PM" etc.
Nasty, I know, unprofesisonal, I know but soo much fun!
Nige
Thanks For The Quick Replies
I Am Studying The Code....
The Answer For Why This Protection:
My Immediate Boss is copying my plans and showing others as his own !!!!!!!!!
Im still thinking of this "save as" issue
you need VBA code
Try the following draft code:
1. insert a new class module named class1
then add the following code:
===========================================
Public WithEvents App As Application
Private Sub App_ProjectBeforeSave(ByVal pj As Project, ByVal SaveAsUi As Boolean, Cancel As Boolean)
Dim strName As String
strName = InputBox("Password:")
If strName <> "z" Then
Cancel = True
MsgBox "you do not have the right to save" & Chr(10) & " Close the project without saving"
End If
End Sub
============================================
2. goto VBAPorject -> Microsoft Project Objects -> This project
add the following code:
============================================
Dim myapp As New Class1
Private Sub Project_Open(ByVal pj As Project)
Set myapp.App = Application
End Sub
============================================
3. set password to protect this VBAProject
with this code, when you try to save/save as the project
there will be a popup window to check password(here the password is z, you can change it).
if the password is not correct, the save operation will be canceled with a message - you do not have the right to save...
I think for most of the users, this kind of protection is enough. But this is still easy to crack, as you can find a lot of tools(software) to remove VBA protection, then you can see the above code.
hope this helps
Quick solution is to issue Adobe Acrobat PDF files of the views that you want others to see and do not let them have access to the project plan.
It will upset peopple - as they cannot interfere - but it does protect everything.
I cannot think of a way to do as you request as, like you say, copying removes most of the protection.
Anyone else know of a way?
Cheers
Nige
You can not prevent others from using Save as in MSP
BTW why you need this.
you just need to protect your own copy or the copy for distribution
MSP can not give you these ability.
you can
1. use PDF for distribution
2. export to excel for distribution
3. Put you .mpp in a folder where all others have only read access right.
4. Use P3 instead