+ Reply to Thread
Results 1 to 3 of 3

Don't select any cell on protected worksheet with unlocked cells

  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    3

    Don't select any cell on protected worksheet with unlocked cells

    I've made an Excel-file with several sheets which contain hyperlinks to navigate from one page to another.

    I wanted to protect the sheets to prevent accidental changing of the data on the sheet. At first my file because useless because the hyperlinks didn't function anymore. Therefore I unlocked every hyperlink cell and protected the sheet again. Now I'm able to navigate through the workbook with the hyperlinks.

    There is one problem though; When I activate a sheet, the last selected cell of that sheet is still selected and that doesn't look very nice in my opinion.
    I would like that no cell is selected when the sheet is activated (Like a sheet that is proteced of selecting locked and unlocked cells)
    If this isn't possible i would like to always select the same, unlocked cell, so that there is some kind of standard.

    I tried using the following code, but no succes:
    Please Login or Register  to view this content.
    A1 is a locked cell: When the sheet is protected the last selected cell remains selected. When the sheet isn't protected cell A1 is selected.
    Cell C5 is the unlocked cell that could be selected if it isn't possible not to select any cell. I suppose it is no problem that this cell is merged?

    And while we're at it:
    Is it possible to always show the sheet from the first row down when activating it (Regardless of the view of the sheet when activating another sheet?

    I hope somebody can help, just tell me if no solution is possible.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Don't select any cell on protected worksheet with unlocked cells

    Hi,

    I don't see the behaviour you describe. Can you upload your workbook?

    Don't forget you can always start the macro with ActiveSheet.Unprotect, and finish it with ActiveSheet.Protect
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    12-11-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Don't select any cell on protected worksheet with unlocked cells

    Hi,

    I was just making a small version of my file (because it contains >100 sheets) when I found out what the problem was.
    When editing my file I had the Designer mode turned on. That was the reason my code wasn't functioning properly...

    Nevertheless hereby the file:
    As you can see, cell C5 is always selected now. I suppose there it is not an option to change that?

    Thanks for the help so far...

    Edit: There is a problem with the file because I deleted the startup worksheet, but I can't upload a new file...Appologies for that.
    Attached Files Attached Files
    Last edited by L.Overes; 01-18-2013 at 03:33 AM. Reason: File error

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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