Results 1 to 5 of 5

Lock Button that Locks Specific Cells

Threaded View

Guest Lock Button that Locks... 09-01-2008, 05:41 PM
VBA Noob mushman1, Welcome to the... 09-01-2008, 05:48 PM
Guest Thanks VBA Noob. Worked great... 09-02-2008, 06:56 AM
Entregan Re: Lock Button that Locks... 10-16-2015, 09:25 PM
skywriter Re: Lock Button that Locks... 10-16-2015, 09:35 PM
  1. #1
    mushman1
    Guest

    Lock Button that Locks Specific Cells

    Hello-

    This should be very simple, but I've run into an error:

    What's trying to be accomplished:
    - When user clicks on a button, VBA selects and locks a cell

    What's been done:
    - Very simple VBA code attached to a button:

    Private Sub CommandButton1_Click()
    Range("F6").Select
        Selection.Locked = True
    End Sub
    Sheet/Book conditions:
    - The entire sheet is locked and protected with the exception of the cell (F6) and the button
    - When protecting, 'select unlocked sells' and 'format cells' are checked

    Current error I'm getting:
    Unable to set the Locked property of the range class

    This is very basic, and it has me stumped. Thoughts?

    Thx!
    Last edited by VBA Noob; 09-01-2008 at 05:46 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. protection of a workbook + unprotecting specific cells + calculation auto
    By choubix in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2008, 07:49 AM
  2. using VBA to hide columns and rows that do not have cells with a specific format
    By fecurtis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2008, 05:47 PM
  3. Lock different properties for different cells
    By seron in forum Excel General
    Replies: 6
    Last Post: 01-24-2007, 11:07 PM
  4. Replies: 1
    Last Post: 11-13-2006, 10:05 AM
  5. Getting range of cells with specific text colour, then using in a COUNTIF formulae
    By cheekyflash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2006, 08:58 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