+ Reply to Thread
Results 1 to 5 of 5

Excel / protecting worksheet with macro

  1. #1
    Registered User
    Join Date
    03-14-2013
    Location
    Kuwait
    MS-Off Ver
    Excel 2003
    Posts
    3

    Excel / protecting worksheet with macro

    Worksheet can be protected with macro but once the macro is run and reprotect the worksheet it can be simply open by simple click of unprotect menu , is there any other way that we could protect the worksheet...with macro it's like the worksheet is unprotected .

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2013 on Win10 (desktop), 2007 on Win10 (notebook)
    Posts
    8,099

    Re: Excel / protecting worksheet with macro

    Hi, Denz_711,

    have you set a password for the protection which must be used to unprotect the worksheet as well?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    03-14-2013
    Location
    Kuwait
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Excel / protecting worksheet with macro

    Quote Originally Posted by HaHoBe View Post
    Hi, Denz_711,

    have you set a password for the protection which must be used to unprotect the worksheet as well?

    Ciao,
    Holger
    " Yup ...the worksheet is protected with password but once you run a macro to unprotect it you will be required to input a password and same time before closing macro can protect it again... which correct routine . the problem is that the protected worksheet is now volatile and can be easily unprotect with a click of unprotect menu ...hence it will not ask for a password and the worksheet will just simply open unprotected. "
    Last edited by Denz_711; 03-18-2013 at 01:12 AM.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2013 on Win10 (desktop), 2007 on Win10 (notebook)
    Posts
    8,099

    Re: Excel / protecting worksheet with macro

    Hi, Denz_711,

    please do not quote whole postings, see the [url=http://www.excelforum.com/forum-rules/642590-forum-rules.html]Forum Rules/url] for more information.

    As I do not know why you need to unprotect the sheet: have you considered using the parameter UserInterfaceOnly:=True to run macros on the sheet without unprotecting it? Please note that this is a volatile setting (will not be saved with the workbook so needs to be put either in the Workbook_Open and/or Worksheet_Activate event).

    Is the version Excel2003 the one you use like stated in your profile?

    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    03-14-2013
    Location
    Kuwait
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Excel / protecting worksheet with macro

    Thanks Holger for your reply ... I'm using mixed version of excel 2003...2007..etc. which ever terminal I'm in the company and at home and the only things it has same result .. I did not still try to use userInterfaceOnly:=True , but yup I need to protect the worksheet after using macro. Hence without macro worksheet can be protected by password but with macro run on the sheet ... it's can be open easily ... and it will not ask a password . Maybe there is still some way around to protect the sheet with password ??? need to protect those formula on the sheet from unexperienced user..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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