+ Reply to Thread
Results 1 to 18 of 18

Password Protection

  1. #1
    Registered User
    Join Date
    01-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    17

    Password Protection

    Hi There,

    I have a simple time tracker shared with my team to track their breaks. I just want that tracker to be password protected I mean once clicked on Start or Stop button only admin who knows the password can change that value. I tried to protect it with password but it is asking password every time when user clicks on start and stop.

    Also, if any you have any suggestions to enhance it that will be appreciated.

    Thanks & Regards,
    Sameer
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Password Protection

    Unprotect and Protect the sheet using the below code

    Please Login or Register  to view this content.
    Userinterfaceonly:=True will disable manual inputs and allow the macro to change the cells without unprotecting the sheet.

    So your current code don't need any protection and unprotection

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    01-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Password Protection

    Hi Sir,

    I want these fields to be protected by password. Is there any way that user can click on these buttons but can not change it. I mean only one user (Manager) will have rights to change these values

    Thanks for your time and sorry to bother you again

    Sameer

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Password Protection

    I don't know whether you got my point or not

  5. #5
    Registered User
    Join Date
    01-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Password Protection

    Sorry I did not read it 1st time... it is working as i wanted it to be...

    Thanks a ton...

    Sorry once again

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Password Protection

    Glad it helps you and thanks for the feedback

  7. #7
    Registered User
    Join Date
    01-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Password Protection

    Hi Sir,

    I was able to create a Password Protected Time Tracker for my team but now I am facing challenge to share it with my team.

    Can you please suggest me if I share that Spreadsheet with 10 Members and if 2 of them click Start tab at same time will it be shared and how can i get report for each of them?

    I have attached file for reference please suggest me something that will help me to get time tracker for a team of 10
    Attached Files Attached Files

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Password Protection

    When you allow the users by way of applying the sharing then it's not going to be a right approach. I give below the practical difficulties for your reference.

    Cells(Rows.Count, 4).End(xlUp).Offset(1) = Now

    The above line of code will add the start time in the last cell. Assume that three persons are started the work and the second person finished the work and pressing the Stop button.

    Cells(Rows.Count, 5).End(xlUp).Offset(1) = Now

    Will put End Time for the First Persons entry. Is it right?

  9. #9
    Registered User
    Join Date
    01-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Password Protection

    Yes that is correct... Can you please suggest me something better please !

    I have tried to keep that file on shared location and asked them to copy paste it on their own folder but that is also hectic as every time after pasting a file I have to manually run macros... Please Help!

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Password Protection

    From my point of view keeping a single file and sharing the file for 10 persons is ok but I don't know how much you are aware of the issues of shared workbook and it requires some maintenance too...

    I will give another probability for you...

    Assume that 10 persons are working in shared workbook and the users on shared workbook should Save the file before/after doing any entry. Doing save before doing any entry is to see the changes of other users so that we can pick the next blank cells for our use. Doing Save After the entry will let the persons to know the change that you have done.

    In this case assume that 2 persons are pressing the Start button on the same instance in that case the code will run and pick the last blank row and put the start time but when both press ctrl+s in that time it will show User Conflict message box by showing both of the entries on that cell.

    So the user should decide which one to keep and which one to be ignored. That time the user should move his entry to new blank row and press accept others option. Again when doing all those things other person might have generated another start time in that new row then again it will leads to conflict.

    You know some lazy persons as I seen at my work place they simply press Ignore Others and Accept Mine button because they are not interested in doing all these process. Due to this we see lot of missing entries because some of them are replaced it with their text.

    So it's your choice to pick the comfortable one

  11. #11
    Registered User
    Join Date
    01-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Password Protection

    My Boss is forcing me to use existing spreadsheet (the one I attached) so, is there any way to run macros automatically if I open the spreadsheet. I mean if I keep one reference sheet on shared location and user will copy paste the same in his\her personal folder for each date. It gives error to new spreadsheet until we run macros manually. By any chance can we fix it???

    Thank you so much for your time and sorry to trouble you again n again.. I know its frustrating so, sorry again.

  12. #12
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Password Protection

    Quote Originally Posted by sam2424 View Post
    It gives error to new spreadsheet until we run macros manually. By any chance can we fix it???
    Not sure what error is that and the above statement is also not clear about why the error is occurring and all. If possible please brief it for better understanding

  13. #13
    Registered User
    Join Date
    01-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Password Protection

    I have attached the screenshot
    Attached Files Attached Files

  14. #14
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Password Protection

    What version of excel you are using? Is it excel 2013?

    The error denotes that the sheet is protected manually so when you try to access the protected range then vba throws the error because of no access. So it is asking you to un-protect the sheet, I think so...

    Please confirm...

  15. #15
    Registered User
    Join Date
    01-23-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Password Protection

    Yes I'm using excel 13 ... So, what should I do ?

  16. #16
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Password Protection

    Post #14 is having the reason and the rectification method

  17. #17
    Registered User
    Join Date
    08-12-2014
    Location
    Việt Nam
    MS-Off Ver
    2007
    Posts
    32

    Re: Password Protection

    Hi you.
    i know a way that can help you. I think it is the best way for you ti fix your problems. It is a add-in A-toos in Excel, it can help you to share your excel file in LAN or in Internet. In addition, it can help you to authorization for the other computer, what can connected to open what kinds of Excel file, what kinds of sheets, which have authorization to edit or only view, copy or print?

    Thanks you.
    Last edited by bluesoftsbl2; 08-16-2014 at 05:45 AM. Reason: links removed

  18. #18
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Password Protection

    bluesoft, please do not post links to commercial sites here
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Password protection
    By edwedw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2010, 07:08 AM
  2. password protection-is there anyway to put a password on running a macro in excel?
    By Solarissf in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2008, 10:06 AM
  3. password protection
    By Neil_Pattison in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2005, 10:05 PM
  4. Password Protection
    By Tom in forum Excel General
    Replies: 2
    Last Post: 06-23-2005, 09:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1