• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Protect sheet n hide formulas

Tom22

Member
Hi,
i am working on very highly sensitive file. so i want that no one can change anything in it.

So can any one suggest vba code with which i can protect my all 3 sheets and also hide formulas applied in those.

So that no one can change anything in it...or specifically it should be read only for outsider.

Attaching one reference file.

Thanks in advance.
 

Attachments

  • Test.xlsm
    11.3 KB · Views: 3
Tom22
You wrote... i want that no one can change anything in it.
Is that file one of those?
... it could make a bit harder ... but not bulletproof!
... if someone would like to use it!
or it would be really hard to use!
 
Vletm... I just want no one can change anything means if person salary is 20k and on that basis we are calculating everythg.. So if I change 20k to 25k then it will change everythg... So I want user of this file to just see it... I prevent them to make any change in the file....
Marc... I can't make it pdf as this is very small version of actual file... Actual file as more than 20 tabs and lot other macros are working in it...
 
Tom22
How would Excel know how much is someones salary?
Your i want that no one can change anything in it.
Doesn't that mean ... NO ONE?
Or if anyway someone could edit that file - then how could Excel know, who would be that someone?
If that someone is ONLY You, then You could have that file in safe place and edit it as needed ...
and for other users, Your could make automatic copy of it with readonly-option...
but still ... there would be challenges to prevent editing even 50%.
As I wrote - it could make a bit harder for average basic users.
... and PDF-files could edit ...hmm?
 
I am sorry if i am not able to make you understand what I mean... Okay let me try it again.... I will be making entries in the file like salary n bonus... With the formulas it will automatically calculate tax and net salary... And then I present this file to users to see their data... Is it right or wrong.. If right then that is end but if not they will revert to me on mail rather than make changes in excel file itself... I will make changes in the file to track who has given what inputs and for this purpose I need to lock editing in the file.. So that no one edit anything in it..
 
So an easy way is to just define a password for the writting and of course you keep it secret !​
Without this password any user can open the workbook as read only …​
 
Tom22
I am sorry if i am not able to make you understand what I mean... Okay let me try it again.... I will be making entries in the file like salary n bonus... With the formulas it will automatically calculate tax and net salary... And then
this far everything is Okay - If You keep that file only with Your known place!
I present this file to users to see their data...
Yes, it's good that other could see their data
Is it right or wrong..
The way, how You would do would give an answer!
I won't send that same file for others! I would keep it for my self.
Do others need only see those data?
If only see, then there no need any macros or so! ~xlsx-file or save needed sheet as PDF.
But still
... anyone who really would like to edit any Your sending file - can do it!
No matter, if there is password or not!
 
I will be saving this file on share path so... Every body will go there and see it.... Because of this I don't need to send file to everyone... If anybody want changes they will let me know.. I will making changes after u protecting the file
 
Tom22
My opinion is that You do not save that file on share path.
Yes, no need to send file for everyone - then there would be ... a lot of same files.
You'll save a user copy, which they could read.
If they would like to get any changes.
They would 'someway' let You know - what?
... and after that You would make those changes to the original Your file!
'Someway' - could be eg one sheet in that file, where others could WRITE their hopes or
they could send email for You or visit and tell their hopes.
Only You have that the original file which matters!
 
Vletm... I can't the process overnight.. This is something called standard operating procedure... Yes may be in due time I can but now I have to provide this file on Monday... So can we focus on original problem which I shared first type... I have more than 20 tabs... So can't go and protect, unprotect every tab.. So looking for code to protect every tab in one go
 
Tom22
You cannot protect Excel file 100% that anyone could edit it!
It could make only a bit harder!
> If You want to 'protect it' then
Tools > Protection > Protect Workbook >
make needed settings and apply passwords.


As I tried to write in my previous reply.
You keep Your file Yourself - it's only and only legal file of that - okay?
You can save that same file to that shared path - okay?
And other can see it - okay?
If they need to get any changes - then any changes will make to Your original file.
 
Back
Top