+ Reply to Thread
Results 1 to 21 of 21

unlock the selected cell

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    unlock the selected cell

    Hello to all.
    The workbook is now blocked, only the blue cells are not blocked
    you can select a cell of the yellow range and unlock only the selected?
    then another button to re-lock the cell again.
    I attach an example.
    I hope I explained.
    max_max
    --------------------------------------------------------------------------
    Ciao a tutti.
    Il workbook ora è bloccato, solo le celle blu non sono bloccate
    è possibile selezionare una celle del range giallo e sbloccare solo la selezionata?
    poi un'altro pulsante per ribloccare di nuovo la cella.
    Aleggo un esempio.
    max_max
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    928

    Re: unlock the selected cell

    This could work for you, then create the buttons and assign the macros.
    Please Login or Register  to view this content.
    Last edited by rollis13; 11-26-2016 at 11:59 AM.

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    Hello Rollis,
    my message error ....
    If the cell block is united not work.
    max_max
    -----------------------------------------
    Ciao rollis,
    un mio errore di messaggio....
    Se la cella da bloccare è unita non funziona.
    max_max
    Attached Files Attached Files

  4. #4
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    another change the macro must unlock from the row3
    -------------------------------------------------------------
    un'altra modifica la macro deve sbloccare dalla riga3

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    I badly explained myself?

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: unlock the selected cell

    Hello max_max,

    If the cell block is united not work.
    That happens when you Merge Cells, which is not a good idea, and over complicate things when you want to automate things with VBA

    I have Removed that "united block" - which are the Merged Cells, and used only a wider Column B instead.

    Your Code would now look like below:

    Please Login or Register  to view this content.
    Sample Workbook included for your perusal.


    Ciao
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  7. #7
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    Please Login or Register  to view this content.
    not work, merged cells.
    max_max

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: unlock the selected cell

    Hello max_max,

    If the cell block is united not work.
    That happens when you Merge Cells, which is not a good idea, and over complicate things when you want to automate things with VBA

    I have Removed that "united block" - which are the Merged Cells, and used only a wider Column B instead.

    Can you cancel Merged Cells to Column B only as per my sample Book?

  9. #9
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    The example workbook.

  10. #10
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    The example workbook.
    Attached Files Attached Files

  11. #11
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: unlock the selected cell

    Hello max_max,

    We seem to have some kind of a language barrier, since you do not respond to my statements regarding Merged Cells.

    Please try the attached Workbook.
    Attached Files Attached Files

  12. #12
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    Hello Winon,
    the macro seems perfect
    I have to try the macro in the my office tomorrow.
    Thank you.
    max_max

  13. #13
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: unlock the selected cell

    Hello max_max,

    I have to try the macro in the my office tomorrow.
    Thank you.
    Does it work for you?

    Regards.

  14. #14
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    Thanks Winon
    it works.
    thank you.
    max_max

  15. #15
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: unlock the selected cell

    Hello max_max,

    Thank you for the confirmation, and that you will add to my Reputation!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Thanks.

  16. #16
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    Hello,
    Winon your macro is perfect.
    it is possible a change?
    Now with the UNLOCK button will lock the entire Range ("B7:K31")
    you can select only a range of cell blocks only this cell?
    max_max
    --------------------------------------------------------------------------
    Ciao,
    winon la tua macro è perfetta.
    é possibile una modifica?
    Ora con il pulsante UNLOCK si blocca tutto il range Range("B7:K31")
    è possibile selezionando solo una cella del range si blocchi solo questa cella?
    max_max

  17. #17
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    Not block the entire range

    With ActiveSheet.Range ("B7: K31")
    ActiveSheet.Range ("B7: K31"). Locked = False 'Change range to suit.
    If ActiveSheet.Range ("B7: K31"). Locked = False Then

    but only the selected cell.
    max_max

  18. #18
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    928

    Re: unlock the selected cell

    Change Winon's work to this, should do the job:
    Please Login or Register  to view this content.
    or my first macro changed to:
    Please Login or Register  to view this content.
    Last edited by rollis13; 12-03-2016 at 06:47 PM.

  19. #19
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    Hello Winon,
    it's perfect.
    A change:
    add in macro

    Please Login or Register  to view this content.
    there are no unlocked cells.
    max_max

  20. #20
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    I mean:

    if in the range B7: K31 there are no locked cells on T2 = message "no locked cell"
    max_max

  21. #21
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unlock the selected cell

    Ops,
    I've seen the changes of Rollis.
    thanks Rollis,
    it is OK.

+ 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. Lock/Unlock a cell based on the value selected from drop down in adjacent cell
    By mahesnrm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2013, 08:28 AM
  2. MAcro to lock and unlock cells depending on rows selected.
    By ballack in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-25-2007, 11:04 PM
  3. Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. Replies: 0
    Last Post: 09-06-2005, 04:05 AM
  5. Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  6. Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  7. Replies: 1
    Last Post: 06-24-2005, 09:59 AM
  8. Replies: 1
    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