+ Reply to Thread
Results 1 to 4 of 4

vba problem when protecting sheet.

  1. #1
    Registered User
    Join Date
    11-16-2009
    Location
    Doncaster, England
    MS-Off Ver
    Excel 2000
    Posts
    26

    vba problem when protecting sheet.

    Hi guys. I now have the worksheet I wanted all done and as I have not used VBA before using this sheet I did knot know protecting it stopped my VBA from working.

    What I am looking to know please is what is the code to unprotect the sheet then re- protect the sheet and where in the VBA should I put it?
    there is no password it just to stop people changing/deleting things by accident.

    here is an exstract of the code (thank you palmetto)

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 11-24-2009 at 08:55 AM. Reason: tags revised to CODE from QUOTE

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: vba problem when protecting sheet.

    See this link: How To Run Macros On Protected Worksheets & Sheets
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: vba problem when protecting sheet.

    You will need to uprotect the sheet in the code, example
    Please Login or Register  to view this content.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: vba problem when protecting sheet.

    gareth, I can see you've tried to comply by adding tags - however going forward could you please ensure you use CODE tags as opposed to QUOTE tags ?

    manually: simply replace QUOTE with CODE
    icons: use the # icon rather than the Quote icon to wrap selected text in appropriate tags

    I have modified your first post on this occasion.

    TIA

+ 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