+ Reply to Thread
Results 1 to 4 of 4

Locking Specific Cells

  1. #1

    Locking Specific Cells

    Hey i have an interesting situation. I need certain cells in my file
    to be protected while others are manipulated. Now normally we would do
    this by going in to the cell formatting and clicking the lock cell
    button then protecting the file. However, this doesn't work for my
    situation. The reason is because I have a macro running in the back of
    the program that is running so that when data is imported in these
    cells the column width adjusts to the right size. I cannot remove this
    feature because it needs to fit on one page....all i am looking for is
    a way to lock a range of cells from text editing. Any help?


  2. #2
    Tom Ogilvy
    Guest

    Re: Locking Specific Cells

    look at the UserInterFaceOnly property of the protect method (in Excel vba
    help). This must be set each time the workbook is opened and must be set
    with code. Then your code can work while the sheet remains protected.

    --
    Regards,
    Tom Ogilvy


    <[email protected]> wrote in message
    news:[email protected]...
    > Hey i have an interesting situation. I need certain cells in my file
    > to be protected while others are manipulated. Now normally we would do
    > this by going in to the cell formatting and clicking the lock cell
    > button then protecting the file. However, this doesn't work for my
    > situation. The reason is because I have a macro running in the back of
    > the program that is running so that when data is imported in these
    > cells the column width adjusts to the right size. I cannot remove this
    > feature because it needs to fit on one page....all i am looking for is
    > a way to lock a range of cells from text editing. Any help?
    >




  3. #3
    Tom Ogilvy
    Guest

    Re: Locking Specific Cells

    Of course another option is to have your code unprotect the sheet, set the
    column width, protect the sheet.

    --
    Regards,
    Tom Ogilvy


    <[email protected]> wrote in message
    news:[email protected]...
    > Hey i have an interesting situation. I need certain cells in my file
    > to be protected while others are manipulated. Now normally we would do
    > this by going in to the cell formatting and clicking the lock cell
    > button then protecting the file. However, this doesn't work for my
    > situation. The reason is because I have a macro running in the back of
    > the program that is running so that when data is imported in these
    > cells the column width adjusts to the right size. I cannot remove this
    > feature because it needs to fit on one page....all i am looking for is
    > a way to lock a range of cells from text editing. Any help?
    >




  4. #4
    ME @ Home
    Guest

    RE: Locking Specific Cells

    you could use text validation on the cells you do not want entered and set it
    not allow entrys more than 0 characters

    or put in your macro ,,,,

    password.unprotect
    to unprotect the sheet whilst the macro is running
    and password.protect
    at the end of your macro to re protect your sheet

    "[email protected]" wrote:

    > Hey i have an interesting situation. I need certain cells in my file
    > to be protected while others are manipulated. Now normally we would do
    > this by going in to the cell formatting and clicking the lock cell
    > button then protecting the file. However, this doesn't work for my
    > situation. The reason is because I have a macro running in the back of
    > the program that is running so that when data is imported in these
    > cells the column width adjusts to the right size. I cannot remove this
    > feature because it needs to fit on one page....all i am looking for is
    > a way to lock a range of cells from text editing. Any help?
    >
    >


+ 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