+ Reply to Thread
Results 1 to 5 of 5

sheets lock for edit or protect sheet but macro can add data

  1. #1
    Registered User
    Join Date
    06-25-2015
    Location
    pune
    MS-Off Ver
    2007
    Posts
    8

    sheets lock for edit or protect sheet but macro can add data

    Dear member i create small macro to book test drive . there are 3 sheet , i want to lock all cells on 2nd sheet where is my dashboard except buttons and only D3 cell where i have to click and select date. and 3rd sheet where my all data store. please help to lock this two sheet
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    10-19-2012
    Location
    Omaha, Nebraska USA
    MS-Off Ver
    Excel 2010
    Posts
    249

    Re: sheets lock for edit or protect sheet but macro can add data

    Hi,

    Here is some code that will do what you are describing if the sheets are not password protected.

    Please Login or Register  to view this content.
    Hope that helps,

    Dan
    Last edited by djbomaha; 04-23-2016 at 11:36 AM.

  3. #3
    Registered User
    Join Date
    06-25-2015
    Location
    pune
    MS-Off Ver
    2007
    Posts
    8

    Re: sheets lock for edit or protect sheet but macro can add data

    Dear djbomaha
    thanks for prompt reply... i tried code but it getting error variable not define. please tell me what is variable type. and one more thing is this code stored data from user form and display on dashboard ?

  4. #4
    Forum Contributor
    Join Date
    10-19-2012
    Location
    Omaha, Nebraska USA
    MS-Off Ver
    Excel 2010
    Posts
    249

    Re: sheets lock for edit or protect sheet but macro can add data

    Hi,

    I edited the code above to define "i". It is the only variable in the code. The code posted is stand-alone and could be run independently. It could be called from a button on your workbook or from a form control on a userform as well depending on what you are trying to do.

    Thanks,

    Dan

  5. #5
    Registered User
    Join Date
    06-25-2015
    Location
    pune
    MS-Off Ver
    2007
    Posts
    8

    Re: sheets lock for edit or protect sheet but macro can add data

    Dear djbomaha,
    Thanks for your support...
    please find attached same macro i want to do some changes in it but i dont know how to start . please help me


    i want to do some changes in sheet2 which is "check availability" i want to add to more color in it that is cyan for washing and yellow for Other facility TD (i was used it for double booking ) . i will add one more control on form whre i give facility to choose the purpose of booking vehicle like for test drive , washing ,other facility TD etc. according to that my dashboard shows color.
    all code is in test module .....
    please help
    Attached Files Attached Files

+ 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. Edit existing marco to unlock protect sheet, remove set criteria and re protect sheet
    By summer2010 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2013, 09:29 AM
  2. Replies: 5
    Last Post: 05-29-2013, 07:56 AM
  3. Lock AND Protect all work sheets VBA
    By rduggy in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-10-2012, 10:56 AM
  4. [SOLVED] Macro created for Sheet 1, need to edit it so that it works for other sheets as well.
    By aadeshgandhi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2012, 03:53 PM
  5. Protect sheet and edit Objects
    By FrankD10 in forum Excel General
    Replies: 3
    Last Post: 08-06-2012, 04:02 PM
  6. lock cells for edit without using sheet protection
    By jimjaix in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-11-2009, 10:32 AM
  7. Lock and password protect only cells with formulas on all sheets in a workbook
    By steve in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-10-2006, 03:29 AM

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