+ Reply to Thread
Results 1 to 8 of 8

please let me know how can i set a range of column to lock

  1. #1
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    please let me know how can i set a range of column to lock

    please let me know how can i set a range of column to lock

    this code locking whole sheet before entering the words


    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: please let me know how can i set a range of column to lock

    Are you sure the cells in the sheet aren't already locked before you start? Locked is the default value.
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  3. #3
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Re: please let me know how can i set a range of column to lock

    this code locks the whole sheet cells

    i am trying make fixed columns to be locked

    please let me know

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: please let me know how can i set a range of column to lock

    Hi baig123,
    try first follow this code
    Please Login or Register  to view this content.
    and then this one
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Re: please let me know how can i set a range of column to lock

    hey i am getting the Run time error '1004':

    unable to set the locked property of the range class

    ActiveSheet.Cells.Locked = False ------------------>In this line

    my sheet is empty after entry of data it should automatically lock the range of column which i have been given in code

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: please let me know how can i set a range of column to lock

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    03-01-2014
    Location
    Mysore
    MS-Off Ver
    Excel 2007
    Posts
    379

    Re: please let me know how can i set a range of column to lock

    sorry

    iam getting the same output

    my whole sheet is getting locked cant edit other columns

    i am trying fixed range of columns should be lock and cannot be edited

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: please let me know how can i set a range of column to lock

    try to do it manually (it should be done once):
    select all the cells in the worksheet (Ctrl+A), right-click and select - Cells Format - Protection - uncheck 'Protected cell' - 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. [SOLVED] Lock Specific Range
    By joh46k in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2013, 06:40 AM
  2. [SOLVED] Lock column based on value in one cell column
    By gilly68 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2012, 05:08 PM
  3. Conditional Formatting - Grey Out and Lock A range based on a cell value in that range
    By Excelgnome in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2012, 07:31 PM
  4. Lock range of cells using VBA
    By rtaboada in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2011, 02:02 PM
  5. Lock range of cells dependant on date range
    By stir-crazy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2008, 09:40 PM

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