+ Reply to Thread
Results 1 to 7 of 7

disable cells editing

Hybrid View

  1. #1
    Sam
    Guest

    disable cells editing

    Hi;
    I'd like to prevent the user to edit the content of my cells in the
    sheet. This is easy, however I want these same cells to be editable
    progamatically by my macros. And this is my problem, if I lock the
    cell, how can i modify them in the macros ?

    thx


  2. #2
    Hank Scorpio
    Guest

    Re: disable cells editing

    On 24 Apr 2005 03:05:07 -0700, "Sam" <samuel.berthelot@voila.fr>
    wrote:

    >Hi;
    >I'd like to prevent the user to edit the content of my cells in the
    >sheet. This is easy, however I want these same cells to be editable
    >progamatically by my macros. And this is my problem, if I lock the
    >cell, how can i modify them in the macros ?


    Unprotect the sheet by VBA code before you edit it:

    Sub EditProtectedSheet()

    If Sheet1.ProtectContents Then
    Sheet1.Unprotect "MyPassword"
    End If

    Sheet1.Cells(1, 3).Value = "Input2"

    Sheet1.Protect "MyPassword"

    End Sub



    ---------------------------------------------------------
    Hank Scorpio
    scorpionet who hates spam is at iprimus.com.au (You know what to do.)
    * Please keep all replies in this Newsgroup. Thanks! *

  3. #3
    Sam
    Guest

    Re: disable cells editing

    thx, but in that case, anyone who can open a macro code can actually
    see the password and modify the data, how can i prevent this to happen ?


  4. #4
    jashburn13@charter.net
    Guest

    Re: disable cells editing

    After protecting the sheet through VBA, lock the VBA for editing.


  5. #5
    Sam
    Guest

    Re: disable cells editing

    lock the vba for editing : how do i do that ?

    Thx !


  6. #6
    Gord Dibben
    Guest

    Re: disable cells editing

    Sam

    ALT + F11 to get to VB Editor.

    CTRL + r to open Project Explorer.

    Select your project/workbook.

    Right-click and VBA Project Properties.

    Select Protection tab and follow your nose.

    Workbook must be saved at that point.


    Gord Dibben Excel MVP

    On 24 Apr 2005 08:23:24 -0700, "Sam" <samuel.berthelot@voila.fr> wrote:

    >lock the vba for editing : how do i do that ?
    >
    >Thx !



+ 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